-
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
Call error callback for ZIO die failures #1979
Conversation
Codecov ReportBase: 64.30% // Head: 64.31% // Increases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #1979 +/- ##
==========================================
+ Coverage 64.30% 64.31% +0.01%
==========================================
Files 193 193
Lines 5922 5924 +2
Branches 217 221 +4
==========================================
+ Hits 3808 3810 +2
Misses 2114 2114
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
.fold[UIO[Response]]( | ||
response => ZIO.succeedNow(response), | ||
cause => | ||
(cause.dieOption match { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the error callback should be a function Cause[Nothing] => ZIO[Any, Nothing, Any]
?
This is also pushing a little on whether the exit should really be ZIO[Any, Nothing, Response]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. I think probably it's original goal was only to report netty exceptions, but I think the linked user request to also call it with ZIO die failures from handlers is reasonable. But I did not think of changing the callback type itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Cause[Nothing]
Resolves #1973