Skip to content
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

Task.materializeAttempt doesn't work for BindAsync #170

alexandru opened this Issue Jun 21, 2016 · 0 comments


None yet
1 participant
Copy link

commented Jun 21, 2016

Issue reported by @ksilin at

The onErrorHandleWith operator doesn't work as it should when flatMap is involved, in combination with an Async task, because materializeAttempt doesn't catch errors from the supplied flatMap function in BindAsync.

The following task doesn't recover as it should:

val composedFail = Task("x")
  .flatMap { _ => throw new IllegalStateException("failing") }

val withHandling = composedFail.onErrorHandleWith {
  case e: IllegalStateException =>"recovered from ISE")
  case other => 

@alexandru alexandru closed this in 96afd7f Jun 21, 2016

@alexandru alexandru added the bug label Jun 21, 2016

@alexandru alexandru added this to the 2.0 milestone Jun 21, 2016

@alexandru alexandru self-assigned this Jun 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.