Skip to content

Commit 70f7e65

Browse files
committed
Remove NPE from isClientError classification
NPE in the analytics path is a server bug (null schema field, missing row), not bad user input. Removed from client error list. Will sync this classification with RestPPLQueryAction updates in opensearch-project#5266. Signed-off-by: Kai Huang <kaihuang@amazon.com> Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent e08ef54 commit 70f7e65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/src/main/java/org/opensearch/sql/plugin/rest/RestUnifiedQueryAction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,12 @@ public void onFailure(Exception e) {
255255
}
256256

257257
/**
258-
* Classify whether the exception is a client error (bad query) or server error (engine bug).
259-
* Matches the classification in {@link RestPPLQueryAction#isClientError}.
258+
* Classify whether the exception is a client error (bad query) or server error (engine bug). Will
259+
* be synced with RestPPLQueryAction#isClientError updates in
260+
* https://github.com/opensearch-project/sql/pull/5266.
260261
*/
261262
private static boolean isClientError(Exception e) {
262-
return e instanceof NullPointerException
263-
|| e instanceof IllegalArgumentException
263+
return e instanceof IllegalArgumentException
264264
|| e instanceof IndexNotFoundException
265265
|| e instanceof SemanticCheckException
266266
|| e instanceof ExpressionEvaluationException

0 commit comments

Comments
 (0)