-
Notifications
You must be signed in to change notification settings - Fork 106
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
Could a router have a specific error handler ? #308
Comments
Hello, as you may have read from previous issues and documentation, the
Unfortunately, we only support a global error handler at the moment. I do think that a router specific error handler should be possible in theory since it would be an additive change rather than a breaking one. Do you have reference on the signature, behavior and expectation of this feature? |
A router-specific error handler would just have to get the error and be able to res.send() something. Also while you are considering this, I think currently hyper-express doesn't catch errors when calling a middleware with (req, res, next) signature ? |
I am currently working on a router specific error handler. Would it be possible to be assigned to this? |
I understand that the (err, req, res, next) signature is not supported, however,
that feature is really missing.
For example, my app have three separate routers with totally different behaviors:
and each router needs to deal with errors very differently.
The text was updated successfully, but these errors were encountered: