-
Notifications
You must be signed in to change notification settings - Fork 371
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
UIO-based handlers produce Route.Handled
#2580
Comments
/bounty $50 |
💎 $50 bounty created by ZIO
|
💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @987Nabil has been awarded $50! 🎈🎊 |
Describe the bug
Creating routes with UIO-based handlers produces instances of
Route.Handled
, thus making custom error handling viahandleErrorCause
orhandleErrorCauseZIO
impossible (e.g., logging the defects, custom error responses, etc.).To Reproduce
Here's a minimal reproducer:
Expected behaviour
While the users can mitigate the issue by using one of
Handler
's constructors and specifying an error type manually, I would expect thathandleErrorCause*
methods are applicable by default, especially since their docs say:The text was updated successfully, but these errors were encountered: