You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently an error in one of the uWebSockets handlers crashes the server, e.g. when getDoc fails in the open handler. So e.g. when a file for one room can't be retrieved from S3, the server crashes and all clients connected to other rooms also lose their connection.
Unfortunately I did not find a possibility to attach some kind of error handler like in express. (Or is there one? I'm rather new to uWebSockets.)
Describe alternatives you've considered
One way could be to wrap the code in the handlers in a try-catch and execute a given callback (that would be parameter of registerYWebsocketServer) in the catch, e.g.:
Is your feature request related to a problem? Please describe.
Currently an error in one of the uWebSockets handlers crashes the server, e.g. when getDoc fails in the open handler. So e.g. when a file for one room can't be retrieved from S3, the server crashes and all clients connected to other rooms also lose their connection.
Unfortunately I did not find a possibility to attach some kind of error handler like in express. (Or is there one? I'm rather new to uWebSockets.)
Describe alternatives you've considered
One way could be to wrap the code in the handlers in a try-catch and execute a given callback (that would be parameter of registerYWebsocketServer) in the catch, e.g.:
The text was updated successfully, but these errors were encountered: