When an exception is thrown inside handshake (server/src/auth.js) it is currently caught in error_wrap_socket (server/src/client.js) where the originating request's request_id is unknown. Failed handshake requests will therefore respond with request_id: null
This change is to instead return a rejected promise, which will be caught in the catch clause inside handle_handshake (server/src/client.js), from where a JSON response is sent including the request_id.
Fixes #838
When an exception is thrown inside
handshake
(server/src/auth.js) it is currently caught inerror_wrap_socket
(server/src/client.js) where the originating request'srequest_id
is unknown. Failed handshake requests will therefore respond withrequest_id: null
This change is to instead return a rejected promise, which will be caught in the catch clause inside
handle_handshake
(server/src/client.js), from where a JSON response is sent including therequest_id
.This change is