-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Changes from 5 commits
1785df1
8c9c280
0b6b827
af93be0
d0d7465
6ec459b
982e29f
a210be7
c1daf24
a5a902f
1f47ec5
d7af0d4
701bd17
4ec26f1
39a4b99
1d3b642
ee0ee29
030619b
22adbd3
07f1f72
a002e1b
a6932d6
fb82354
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch; | ||
|
||
import org.opensearch.common.io.stream.StreamInput; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Base exception for a missing action on a primary | ||
* | ||
* @opensearch.internal | ||
*/ | ||
public class InvalidArgumentException extends OpenSearchException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can the existing 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:
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. |
||
public InvalidArgumentException(String message) { | ||
super(message); | ||
} | ||
|
||
public InvalidArgumentException(StreamInput in) throws IOException { | ||
super(in); | ||
} | ||
} |
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?