-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add EventStream.mapError #78
Labels
Comments
|
+1 on total function (since it would support both |
Do you mean you won't need collectError that accepts a PF if mapError
accepts a total function?
…--Nikita
On Sat., May 1, 2021, 9:37 p.m. Ajay Chandran, ***@***.***> wrote:
+1 on total function (since it would support both mapError and
collectError).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#78 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAECBMC2W56S7XSD6LRFGZDTLTJHDANCNFSM42PEMKYA>
.
|
I meant both combinators can be provided. def mapError(f: Throwable => Throwable)
def collectError(pf: PartialFunction[Throwable, Throwable]) = mapError(pf.applyOrElse(_, identity[Throwable])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be implemented using:
This is useful when using Ajax streams with services that can return specific errors.
The text was updated successfully, but these errors were encountered: