Describe the bug
Sending an invalid JSON string to WebSocketServerTransport causes the server to crash, because of an unhandled exception.
To Reproduce
Steps to reproduce the behavior:
- Create a basic application with
WebSocketServerTransport, as described in the main README.
- Start the server
- Open a websocket from a browser, e.g.
const ws = new WebSocket('ws://localhost:3331/');
- Send a string that is not valid JSON, e.g.
ws.send('hi');
- The server crashes with an error.
Expected behavior
The server should respond with error code -32700, as per the specification.
Describe the bug
Sending an invalid JSON string to
WebSocketServerTransportcauses the server to crash, because of an unhandled exception.To Reproduce
Steps to reproduce the behavior:
WebSocketServerTransport, as described in the main README.const ws = new WebSocket('ws://localhost:3331/');ws.send('hi');Expected behavior
The server should respond with error code
-32700, as per the specification.