Skip to content

Fix #977: Only treat structured exception after 2.0. #979

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

Closed
wants to merge 1 commit into from

Conversation

oogFranz
Copy link
Contributor

@oogFranz oogFranz commented Dec 3, 2019

Close #977
After Elasticsearch 2.0, Elasticsearch only responds structured exception.
ref. elastic/elasticsearch#12240

The case of the issue #977 is handling structured exception as semi-structured exception which only occurs before Elasticsearch 2.0.

Ordinal code checks whether $error['error']['reason'] is set.

if (isset($error['error']['reason']) === true) {

But unfortunately, master_not_discovered_exception is thrown with blank error reason.
https://github.com/elastic/elasticsearch/blob/16bfdcacc0172264db9b32aa6edfa8b5c327f3b4/server/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java#L31

@oogFranz
Copy link
Contributor Author

oogFranz commented Dec 3, 2019

Because too many test cases should be fixed, i close this pull-req.

@oogFranz oogFranz closed this Dec 3, 2019
@oogFranz oogFranz deleted the fix/977 branch December 4, 2019 15:57
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.

master_not_discovered_exception results in the following fatal error:
1 participant