-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
render non-ElasticsearchException in ILM #31284
Conversation
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
@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... |
e1b91ad
to
74dbde8
Compare
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? |
I thought you left detailed=false on purpose. I am all for more information |
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
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:
now the
error
will render{ "type": "illegal_argument_exception", "message": "an explanation" }