Is your feature request related to a problem? Please describe.
Currently there is no clean/idiomatic way to handle errors in an handler. It appears that most people are ignoring errors, or wrapping them in a generic util fn.
Describe the solution you'd like
One of the possible ways to fix this would be to allow each hander to return Result<(), E: std::error::Error> so it is possible to use the ? to abort the rest of the handler in case of error. And maybe add an on_error closure.
Describe alternatives you've considered
We must explore other altertives before settling on this solution
Additional context
#770
Is your feature request related to a problem? Please describe.
Currently there is no clean/idiomatic way to handle errors in an handler. It appears that most people are ignoring errors, or wrapping them in a generic util fn.
Describe the solution you'd like
One of the possible ways to fix this would be to allow each hander to return Result<(), E: std::error::Error> so it is possible to use the ? to abort the rest of the handler in case of error. And maybe add an on_error closure.
Describe alternatives you've considered
We must explore other altertives before settling on this solution
Additional context
#770