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

Not getting proper response body in case of error. #100

Open
prat2065 opened this issue May 10, 2019 · 1 comment
Open

Not getting proper response body in case of error. #100

prat2065 opened this issue May 10, 2019 · 1 comment

Comments

@prat2065
Copy link

prat2065 commented May 10, 2019

If I hit qubole API to create schedule directly with an invalid value of frequency say -1, I get the following error message : "Validation failed: Frequency must be an integer greater than 0".
But while using the qubole sdk,we get the response as javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ClientErrorException: HTTP 422 Unprocessable Entity

Hence somewhere you have lost the exact error message given by qubole API .
422 status code can be given by qubole for multiple reasons.
It is happening because in ErrorResponseFilter,you are consuming the error message from input stream and the user will not be able to consume it later.Hence,we should stick the message back to the response context.

@ignat-sachivko
Copy link

I would more generalize the issue:
In case if we get any error from the API through SDK (in my case SparkCommandBuilder), the only entity we are able to handle is Throwable that contains the mentioned above rather generic description.

Thus, there is no possibility to get command ID assigned to the request and trace the cause later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants