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

Guess root cause support unwrap #50525

Conversation

henningandersen
Copy link
Contributor

@henningandersen henningandersen commented Dec 30, 2019

ElasticsearchException.guessRootCauses would return wrapper exception if
inner exception was not an ElasticsearchException. Fixed to never return
wrapper exceptions.

At least following APIs change root_cause.0.type as a result:

_update with bad script
_index with bad pipeline

Relates #50417

Specifically, the need to unwrap here:

2d16e55#diff-13682f098a7ed5c260bb21049e9efd55R88

is that we do not guess root cause correctly for wrapped exceptions.

Marking this as bugfix since it fixes the root_cause of a few APIs.

ElasticsearchException.guessRootCauses would return wrapper exception if
inner exception was not an ElasticsearchException. Fixed to never return
wrapper exceptions.

Relates elastic#50417
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

A few rest tests mistakenly used a wrapper exception as the expected
root cause.
@henningandersen henningandersen merged commit 3c2771a into elastic:master Jan 8, 2020
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Jan 8, 2020
ElasticsearchException.guessRootCauses would return wrapper exception if
inner exception was not an ElasticsearchException. Fixed to never return
wrapper exceptions.

At least following APIs change root_cause.0.type as a result:

_update with bad script
_index with bad pipeline

Relates elastic#50417
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Jan 8, 2020
testFailureToAndFromXContentWithDetails had incorporated that
guessRootCauses returned the wrapper when the underlying exception
was not an ElasticsearchException, fixed.

Relates elastic#50525
henningandersen added a commit that referenced this pull request Jan 8, 2020
testFailureToAndFromXContentWithDetails had incorporated that
guessRootCauses returned the wrapper when the underlying exception
was not an ElasticsearchException, fixed.

Relates #50525
henningandersen added a commit that referenced this pull request Jan 8, 2020
ElasticsearchException.guessRootCauses would return wrapper exception if
inner exception was not an ElasticsearchException. Fixed to never return
wrapper exceptions.

At least following APIs change root_cause.0.type as a result:

_update with bad script
_index with bad pipeline

Relates #50417
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Jan 8, 2020
Removed workaround for guessRootCauses returning wrapper.

Relates elastic#50525 and elastic#50417
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
ElasticsearchException.guessRootCauses would return wrapper exception if
inner exception was not an ElasticsearchException. Fixed to never return
wrapper exceptions.

At least following APIs change root_cause.0.type as a result:

_update with bad script
_index with bad pipeline

Relates elastic#50417
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
testFailureToAndFromXContentWithDetails had incorporated that
guessRootCauses returned the wrapper when the underlying exception
was not an ElasticsearchException, fixed.

Relates elastic#50525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants