Skip to content

render non-ElasticsearchException in ILM #31284

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

Merged
merged 9 commits into from
Jun 15, 2018

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Jun 12, 2018

ILM was rendering exceptions using the exception helper that
basically ignores simply rendering non-elasticsearch exceptions when
no details are desired. This commit updates the method used to still be
a rather simple rendering of the exception. The rendering lacks
all the causes, but does a sufficient job in rendering the top-level
message for one of our most expected exceptions... IllegalArgumentException

Previous Example:

{
  "test": {
   ...
    "step_info": {
      "error": "No ElasticsearchException found"
    }
  }
}

now the error will render { "type": "illegal_argument_exception", "message": "an explanation" }

@talevy talevy added the :Data Management/ILM+SLM Index and Snapshot lifecycle management label Jun 12, 2018
@talevy talevy requested a review from colings86 June 12, 2018 22:05
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

ILM was rendering exceptions using the exception helper that
basically ignores simply rendering non-elasticsearch exceptions when
no details are desired. This commit updates the method used to still be
a rather simple rendering of the exception. The rendering lacks
all the causes, but does a sufficient job in rendering the top-level
message for one of our most expected exceptions... IllegalArgumentException
@talevy
Copy link
Contributor Author

talevy commented Jun 12, 2018

@colings86 I do not like this option, but I don't get why there are no nice options in ElasticsearchException. Might be worth updating core to be friendlier, but this may be fine for now?

unless I am missing another option. One thing I thought about was wrapping the exception in an ElasticsearchException...

@talevy talevy force-pushed the ilm-fix-error-xcontent branch from e1b91ad to 74dbde8 Compare June 13, 2018 00:42
@colings86
Copy link
Contributor

Could you explain what you don't like about this option. Is it just that it doesn't render the complete exception stack?

We render the full exception stack in exceptional REST responses so we should be able to do the same as we do there?

@talevy
Copy link
Contributor Author

talevy commented Jun 13, 2018

We render the full exception stack in exceptional REST responses so we should be able to do the same as we do there?

I thought you left detailed=false on purpose. I am all for more information

@talevy talevy merged commit aa6944a into elastic:index-lifecycle Jun 15, 2018
@talevy talevy deleted the ilm-fix-error-xcontent branch June 15, 2018 18:39
jasontedor pushed a commit that referenced this pull request Aug 17, 2018
ILM was rendering exceptions using the exception helper that
basically ignores simply rendering non-elasticsearch exceptions when
no details are desired. This commit updates the method used to still be
a rather simple rendering of the exception. The rendering lacks
all the causes, but does a sufficient job in rendering the top-level
message for one of our most expected exceptions... IllegalArgumentException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/ILM+SLM Index and Snapshot lifecycle management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants