forked from OpenTSDB/opentsdb
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make all HTTP endpoints send return JSON-friendly error responses.
When generating an error response (say, 400, 404, 500), honor the `json' query string parameter, which indicates that the client wants a JSON response. This was only done by /q, but is now automagically done for all endpoints. In the UI, take advantage of the JSON encoded error responses to show more meaningful error messages than just "Internal Server Error" and such. This allows the UI to show stack traces from the server side with detailed error messages. Change-Id: I2af1a02341850e176daf4fff966999fc652701b6
- Loading branch information
Showing
3 changed files
with
62 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters