-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Mapping IllegalArgumentException to SettingsException extend OpenSearchException in AbstractScopedSettings class #4792
Conversation
…penSearchException in AbstractScopedSettings class Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
* | ||
* @opensearch.internal | ||
*/ | ||
public class InvalidArgumentException extends OpenSearchException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the existing org.opensearch.common.settings.SettingsException
class be used here and avoid creating a new one?
It is important that this case returns a BAD_REQUEST error code, so the following would need to be added to SettingsException to make that happen:
@Override
public RestStatus status() {
return RestStatus.BAD_REQUEST;
}
That might be okay because it looks like the existing usages of SettingsException would probably be better as a BAD_REQUEST, but I'm not 100% sure about that.
…o SettingsException Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
CHANGELOG.md
Outdated
@@ -85,6 +85,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | |||
- Backport Apache Lucene version change for 2.4.0 ([#4677](https://github.com/opensearch-project/OpenSearch/pull/4677)) | |||
- Refactor Base Action class javadocs to OpenSearch.API ([#4732](https://github.com/opensearch-project/OpenSearch/pull/4732)) | |||
- Migrate client transports to Apache HttpClient / Core 5.x ([#4459](https://github.com/opensearch-project/OpenSearch/pull/4459)) | |||
- Mapping IllegalArgumentException to InvalidArgumentException extend OpenSearchException in AbstractScopedSettings class ([#4792](https://github.com/opensearch-project/OpenSearch/pull/4792)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe what has changed for the caller instead?
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
…ception # Conflicts: # CHANGELOG.md
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
In build 9282:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
In build 9355, the same failure as above #4792 (comment) |
Gradle Check (Jenkins) Run Completed with:
|
@xuezhou25 Can you please rebase your branch with the latest commits? |
…ception # Conflicts: # CHANGELOG.md
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Description
Mapping IllegalArgumentException to SettingsException extend OpenSearchException in AbstractScopedSettings class so that the helpful error messages can be reported.
Issues Resolved
resolve #4745
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.