Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 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 by wiktorn, 8 years ago

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 by francois.lacombe, 8 years ago

Really good point

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

comment:3 by Don-vip, 8 years ago

Milestone: 16.11

comment:4 by Don-vip, 8 years ago

Component: Core audioCore

comment:5 by wiktorn, 8 years ago

Resolution: fixed
Status: assignedclosed

In 11250/josm:

Add response debug printing on HTTP Status code >= 300

Closes: #13961

comment:6 by francois.lacombe, 8 years ago

Patching at the speed of light

Thanks a lot Wiktorn :)

comment:7 by Don-vip, 8 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.