Closed DenisFrezzato closed 3 years ago
We could also deprecate the current fromRequestHandler
and remove it in a next release, in favour of fromRequestHandler2V
, or something like this.
Maybe we can overload the function and check if it is used with two or three parameters? I am not a big fan of V2 functions 😅
Maybe we can overload the function and check if it is used with two or three parameters?
This is a good idea, I haven't thought of overloads, thanks for the suggestion!. I've created a PR, if you want to check it out.
🚀 Feature request
Current Behavior
There is no way to handle an error returned by a middleware wrapped with
fromRequestHandler
, the error is just ignored in its implementation.Desired Behavior
I'd like to have a way to handle a possible error returned by a middleware.
Suggested Solution
In my codebase I have this helper:
Who does this impact? Who is this for?
People using Express middlewares developed by the community without
hyper-ts
in mind.Describe alternatives you've considered
Keep using the aforementioned function.
Your environment