#13961 closed enhancement (fixed)
Print HTTP response body in console in case of error code
| Reported by: | francois.lacombe | Owned by: | wiktorn |
|---|---|---|---|
| Priority: | normal | Milestone: | 16.12 |
| Component: | Core | Version: | tested |
| Keywords: | api, http, error, console, log | Cc: |
Description
Hi,
There is actually a lack of verbose in console when a HTTP error rose while uploading or downloading data.
JOSM print out a Java stacktrace with a message saying there was a HTTP error received after the last request instead of HTTP 200 and valid body.
But the server can send useful information about the error in the HTTP body which can help developers to find some mistakes.
Can you please forward this http body to console, and eventually keep the Java stack trace if you think it's important (IMHO it is) ?
Currently, the only way to get the HTTP error body is to reproduce the exact request and catch trafic with wireshark wile interacting with the remote API. It can be tricky with https :)
Thanks in advance
Attachments (0)
Change History (7)
comment:1 by , 9 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 9 years ago
Really good point
And text/plain, application/xml, application/html Content-Type also :)
comment:3 by , 9 years ago
| Milestone: | → 16.11 |
|---|
comment:4 by , 9 years ago
| Component: | Core audio → Core |
|---|



I think that we should restrict this to text-alike
Content-type's (text/xml, text/html).I can take this one.