Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#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 Changed 3 years ago by wiktorn

Owner: changed from team to wiktorn
Status: newassigned

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

I can take this one.

comment:2 Changed 3 years ago by francois.lacombe

Really good point

And text/plain, application/xml, application/html Content-Type also :)

comment:3 Changed 3 years ago by Don-vip

Milestone: 16.11

comment:4 Changed 3 years ago by Don-vip

Component: Core audioCore

comment:5 Changed 3 years ago by wiktorn

Resolution: fixed
Status: assignedclosed

In 11250/josm:

Add response debug printing on HTTP Status code >= 300

Closes: #13961

comment:6 Changed 3 years ago by francois.lacombe

Patching at the speed of light

Thanks a lot Wiktorn :)

comment:7 Changed 3 years ago by Don-vip

Milestone: 16.1116.12

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain wiktorn.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.