Skip to content

Commit

Permalink
Fixed #423. Treating ExpressionEvaluationException as client Error
Browse files Browse the repository at this point in the history
Signed-off-by: vamsi-amazon <reddyvam@amazon.com>
  • Loading branch information
vamsi-amazon committed Mar 3, 2022
1 parent c2e5636 commit e1001f4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.opensearch.rest.RestRequest;
import org.opensearch.rest.RestStatus;
import org.opensearch.sql.common.antlr.SyntaxCheckException;
import org.opensearch.sql.exception.ExpressionEvaluationException;
import org.opensearch.sql.exception.SemanticCheckException;
import org.opensearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer;
import org.opensearch.sql.legacy.antlr.SqlAnalysisConfig;
Expand Down Expand Up @@ -244,7 +245,8 @@ private static boolean isClientError(Exception e) {
|| e instanceof VerificationException
|| e instanceof SqlAnalysisException
|| e instanceof SyntaxCheckException
|| e instanceof SemanticCheckException;
|| e instanceof SemanticCheckException
|| e instanceof ExpressionEvaluationException;
}

private void sendResponse(final RestChannel channel, final String message, final RestStatus status) {
Expand Down

0 comments on commit e1001f4

Please sign in to comment.