-
Notifications
You must be signed in to change notification settings - Fork 332
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
refactor: make HTTP API returns non-200 status code when execution fails #2888
Comments
@killme2008 I would love to work on this issue :) |
Appreciated. Please take it. There are some code that you may want to read All the HTTP API implementation is under: And the main handler is https://github.com/GreptimeTeam/greptimedb/blob/develop/src/servers/src/http/handler.rs The greptimedb/src/servers/src/http.rs Line 246 in ea80570
|
@ananta Just a kind reminder, are u still working on this issue? Happy New Year! |
Hey Happy New Year 🎊 @killme2008 !!, I got caught up with school stuff and couldn't finish the task. I'm going to unassign myself for now, but I'll check back later and see if I can help out if it's still open. Thanks! |
All right! Welcome back if you are not busy in the future. Thank you. |
Closed as resolved in #3473. |
What type of enhancement is this?
User experience
What does the enhancement do?
The HTTP always returns 200 status code even when the execution fails currently. The failure status is attached in the response content as the
code
field. It does not comply with RESTful conventions and may confuse.We'd like to refactor this behavior and return the non-200 status code when the execution fails. But we need to keep returning the
code
field in the response JSON content.Implementation challenges
Maybe some test cases should be fixed while doing this refactor.
The text was updated successfully, but these errors were encountered: