Issue #37 Added handler for websocket onerror function