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

Publisher, Single, Completable onError* operators #1435

Merged
merged 8 commits into from
Mar 18, 2021

Conversation

Scottmitch
Copy link
Member

Motivation:
ServiceTalk supports a recoverWith operator which allows for error
recovery [1]. However the signature of this method is more complex than
is often required for simple error recovery, and the name implies
"recovery" which is confusing if the return value is intended to
propagate an error.

[1] http://reactivex.io/documentation/operators/catch.html

Modifications:

  • Add onError* methods to Publisher, Single, and Completable. The
    signatures are specialized for their respective operation (mapping
    Throwable, swallowing exceptions, recovering with a value) and also
    supports filtering by class type and custom Predicate. This naming
    convention is more commonly used by other JVM based rx implementations
    and is assumed to be more familiar to users.
  • Deprecate recoverWith in favor of onErrorResume

Result:
Publisher, Single, and Completable have onError* operators which provide
more APIs tailored toward common error recovery scenarios.

@Scottmitch
Copy link
Member Author

build failure attributed to #999

Motivation:
ServiceTalk supports a recoverWith operator which allows for error
recovery [1]. However the signature of this method is more complex than
is often required for simple error recovery, and the name implies
"recovery" which is confusing if the return value is intended to
propagate an error.

[1] http://reactivex.io/documentation/operators/catch.html

Modifications:
- Add onError* methods to Publisher, Single, and Completable. The
  signatures are specialized for their respective operation (mapping
  Throwable, swallowing exceptions, recovering with a value) and also
  supports filtering by class type and custom Predicate. This naming
  convention is more commonly used by other JVM based rx implementations
  and is assumed to be more familiar to users.
- Deprecate recoverWith in favor of onErrorResume

Result:
Publisher, Single, and Completable have onError* operators which provide
more APIs tailored toward common error recovery scenarios.
@Scottmitch
Copy link
Member Author

build failure attributed to #1200

@Scottmitch
Copy link
Member Author

build failure attributed to #999

@Scottmitch
Copy link
Member Author

another failure attributed to #1200

@Scottmitch Scottmitch merged commit 9fd0add into apple:main Mar 18, 2021
@Scottmitch Scottmitch deleted the on_error branch March 18, 2021 22:10
bondolo pushed a commit to bondolo/servicetalk that referenced this pull request Mar 19, 2021
Motivation:
ServiceTalk supports a recoverWith operator which allows for error
recovery [1]. However the signature of this method is more complex than
is often required for simple error recovery, and the name implies
"recovery" which is confusing if the return value is intended to
propagate an error.

[1] http://reactivex.io/documentation/operators/catch.html

Modifications:
- Add onError* methods to Publisher, Single, and Completable. The
  signatures are specialized for their respective operation (mapping
  Throwable, swallowing exceptions, recovering with a value) and also
  supports filtering by class type and custom Predicate. This naming
  convention is more commonly used by other JVM based rx implementations
  and is assumed to be more familiar to users.
- Deprecate recoverWith in favor of onErrorResume

Result:
Publisher, Single, and Completable have onError* operators which provide
more APIs tailored toward common error recovery scenarios.
idelpivnitskiy added a commit to idelpivnitskiy/servicetalk that referenced this pull request Jun 21, 2021
Motivation:

`recoverWith` operators for `Publisher` and `Single` were deprecated in
apple#1435 and can be removed now.

Modifications:

- Remove `Publisher#recoverWith`

Result:

No deprecated operators on `Publisher` and `Single` API.
idelpivnitskiy added a commit that referenced this pull request Jun 23, 2021
Motivation:

`recoverWith` operators for `Publisher` and `Single` were deprecated in
#1435 and can be removed now.

Modifications:

- Remove `Publisher#recoverWith`

Result:

No deprecated operators on `Publisher` and `Single` API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants