added error handling around message parse on websocket api