-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
ClassCastException when settings set to [] during index creation #45126
Comments
Pinging @elastic/es-core-infra |
What exactly do you think is wrong with this behaviour @thewunder? The request isn't valid so throwing some kind of exception is the right thing to do. |
Closing this for want of feedback. We can always reopen it if we hear back from @thewunder. |
org.elasticsearch.ElasticsearchParseException or org.elasticsearch.action.ActionRequestValidationException? To me as a user, if I am passing invalid input I would expect to see something Validation or parse related and tell me the error made. Internal java exceptions are the least informative type of error. |
This commit adds an explicit error message when a create index request contains a settings key that is not a json object. Prior to this change the user would be given a ClassCastException with no explanation of what went wrong. closes elastic#45126
@thewunder I agree with you, a ClassCastException can be confusing for users that don't understand the connection between Map in the sent request needing to contain a json object, nor where the error occurred within the request body. I've opened #45588 to address this. |
This commit adds an explicit error message when a create index request contains a settings key that is not a json object. Prior to this change the user would be given a ClassCastException with no explanation of what went wrong. closes #45126
This commit adds an explicit error message when a create index request contains a settings key that is not a json object. Prior to this change the user would be given a ClassCastException with no explanation of what went wrong. closes #45126
Thanks @rjernst looks good! |
Elasticsearch version: 6.8.2
Plugins installed: repository-s3
JVM version:
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10)
OS version:
Linux ip-172-31-37-249 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Passing an a
Steps to reproduce:
Stack Trace:
The text was updated successfully, but these errors were encountered: