Show better error messages for failed HTTP requests #127
Description
Description
Currently, failed HTTP requests trigger error messages that are ok in the case of 404
s but are useless, otherwise.
Steps to reproduce the issue:
- Try to view a trace that does not exist
- Execute a search with the tag parameter as "a"
- Run the UI (via checking out this repo) without a query-service running on the proxy port
Describe the results you received:
Step 1 yields a 404
HTTP response and the message "Resource not found in the Jaeger Query Service."
Step 2 yields a 400
HTTP response and the message "Bad JSON returned from the Jaeger Query Service."
Step 3 yields a 500
HTTP response and the message "Bad JSON returned from the Jaeger Query Service."
Describe the results you expected:
The 404
message is fine but should probably be handled in a more generic fashion.
The other responses take two forms: with JSON data describing the error and without JSON data.
Seems like all error messaging should work as follows:
- If there is JSON data, show the response status code and the message from the JSON data
- Otherwise, show the status code and the response text
- If there is no response text, show the status code and the message
An unknown error was encountered
The only exception being the scenario described in #51, which will be addressed by that ticket.
Additional information you deem important (e.g. issue happens only occasionally):
Related issues:
Activity