Skip to content
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

[BUG] Handle emrs exception as 400 #2611

Closed
noCharger opened this issue Apr 11, 2024 · 0 comments
Closed

[BUG] Handle emrs exception as 400 #2611

noCharger opened this issue Apr 11, 2024 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@noCharger
Copy link
Collaborator

noCharger commented Apr 11, 2024

What is the bug?

https://github.com/opensearch-project/sql/blob/main/spark/src/main/java/org/opensearch/sql/spark/client/EmrServerlessClientImpl.java#L62-L74

All exceptions are cast to RuntimeException and if not handled properly it will pops up to the top layer

https://github.com/opensearch-project/sql/blob/main/spark/src/main/java/org/opensearch/sql/spark/rest/RestAsyncQueryManagementAction.java#L180-L200

{ "status": 500, "error": { "type": "RuntimeException", "reason": "There was internal problem at backend", "details": "Internal Server Error." } }

How can one reproduce the bug?

create index xxx
on xxx.xxx.xxx (clientip, year) 
WITH (
auto_refresh=true, 
checkpoint_location = 'xxx'
)'

What is the expected behavior?

com.amazonaws.services.emrserverless.model.ValidationException: Unmatched quote at index 2083 (Service: AWSEMRServerless; Status Code: 400; Error Code: ValidationException; Request ID: xxx; Proxy: null)

This should be a 400 instead of 500

@noCharger noCharger added bug Something isn't working untriaged labels Apr 11, 2024
@noCharger noCharger reopened this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant