-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Handling for websocket #19
Comments
Wondering the same. |
Hi guys, Thanks a lot for the feedback. I'm sorry that this library currently doesn't play nicely with the standard error handling in express. Fixing this shouldn't require too much effort, so I'll try to get it done before the end of this week. |
Thanks, @HenningM! Any updates? If not, do you have any pointers as to how to get it done? Alas, I have been unsuccessful with domains. But if you can recommend something, I could try to get a PR in. |
Hi again @arik-so, Still haven't found time to implement a fix for this. I haven't dug into the details yet, but I have a feeling that this is related to how middlewares are wrapped here: https://github.com/HenningM/express-ws/blob/master/src/wrap-middleware.js#L1. PRs are always appreciated. |
I appear to witness an immediate |
@HenningM I've created a very simple pull-request that will help moving this forward. |
The mentioned PR was released with version 3.0.0. Thanks a lot, @kraenhansen! |
express provide default error handler and also user add user-defined error handler
such as below form.
function errorHandler(err, req, res, next) {
}
but, if error is occurred during processing web socket req/res
this error can not handled by express error handler
so, i wondering that how to handle error for websocket?
The text was updated successfully, but these errors were encountered: