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

Normalize exception from cancelling an observable coordinated operation #4027

Merged
merged 1 commit into from
Aug 15, 2019

Conversation

Mpdreamz
Copy link
Member

Coordinated request observables when aborted could bubble out an UnexpectedElasticsearchClientException or an OperationCancelledException.

This normalizes what gets passed to OnError namely (OperationCancelledException)

This is a bug was never released and something that the early termination in ForEach that #4014 fixed highlighted.

…pectedElasticsearchClientException or a OperationCancelledException, this normalizes what gets passed to OnError (OperationCancelledException)
@@ -143,6 +143,9 @@ public TResponse Request<TResponse>(HttpMethod method, string path, PostData dat
}
catch (Exception killerException)
{
if (killerException is OperationCanceledException && cancellationToken.IsCancellationRequested)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@codebrain codebrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@Mpdreamz Mpdreamz merged commit 6b8c63f into 7.x Aug 15, 2019
@Mpdreamz Mpdreamz deleted the fix/7.x/observable-cancellation-exception branch August 15, 2019 12:37
Mpdreamz added a commit that referenced this pull request Aug 15, 2019
…pectedElasticsearchClientException or a OperationCancelledException, this normalizes what gets passed to OnError (OperationCancelledException) (#4027)

(cherry picked from commit 6b8c63f)
russcam pushed a commit that referenced this pull request Aug 19, 2019
…pectedElasticsearchClientException or a OperationCancelledException, this normalizes what gets passed to OnError (OperationCancelledException) (#4027)

(cherry picked from commit 6b8c63f)
russcam pushed a commit that referenced this pull request Sep 3, 2019
…pectedElasticsearchClientException or a OperationCancelledException, this normalizes what gets passed to OnError (OperationCancelledException) (#4027)

(cherry picked from commit 6b8c63f)
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