If the server response is not a valid json object the following error is thrown:
TypeError: invalid 'in' operand response (line 132 for a simple JSON-RPC response, line 599 for a batch response).
It may also affect the web-sockets JSON-RPC responses (not tested).
If the server response is a valid json but both the "error" and "result" members are missing from response it will be passed as successful with undefined as result (same lines).