Modify

Opened 15 years ago

Closed 15 years ago

#2437 closed enhancement (fixed)

More verbose information about OSM API errors and user help on the wiki

Reported by: Gubaer Owned by: team
Priority: minor Milestone:
Component: Core Version:
Keywords: api 6.0 Cc: Gubaer

Description

User are not warned if the OSM API replies a 409 Conflict status code after a diff upload. Actually, JOSM *does* display a warning, but in the progress dialog only where it is easily overread. Also JOSM tried to read the response body after a 409 which resulted in an IOException which partially obscured the the warning message.

See the attached patch for a proposed fix. This is just a fix for the 409 case. Other error situations may lead to similar problems.

Attachments (1)

OSMAPI-conflict-patch.txt (5.0 KB ) - added by Gubaer 15 years ago.
patch

Download all attachments as: .zip

Change History (14)

by Gubaer, 15 years ago

Attachment: OSMAPI-conflict-patch.txt added

patch

comment:1 by Gubaer, 15 years ago

Cc: Gubaer added
Summary: Warn users in case of 409 Conflict from OSM API[PATCH] Warn users in case of 409 Conflict from OSM API

comment:2 by Markus, 15 years ago

How to apply that patch?
I'm a newbe to java, I decompressed the jar file but it doesn't help me. Do I have to replace the content of the two files or what?

comment:3 by anonymous, 15 years ago

The patch is to be applied to the source tree in JOSMs source repository, not to the compiled classes in the JOSM jar. If you want to build your own JOSM jar which includes the patch you have to checkout the source, apply the patch, and run the build script. On the other hand you can wait until one of the commiters (i.e. framm or stoeckr) apply the patch to the source tree. As soon as the patch is applied you can pick up the latest JOSM jar from the JOSM web site.

comment:4 by Gubaer, 15 years ago

Patch for OsmApi.java obsolete. Better fix by framm in OsmApi 1559.

comment:5 by Gubaer, 15 years ago

Resolution: fixed
Status: newclosed

Patch for OsmServerWriter.java obsolete. Now generic message dialog with error message (OsmServerWriter 1546 by framm).

comment:6 by framm, 15 years ago

JOSM was broken in that the OsmServerWriter still had the "retrying..." message which vanished after 5 seconds, but the OsmApi class only throws exceptions for errors that are not retryable. So I replaced the message in OsmServerWriter by one that requires pressing OK. I think it is still not perfect, I liked the extended information supplied by Gubaer's patch... ideally we should have some sort of generic "help" link given with the error messages so we could provide extensive documentation in the Wiki, what do you think?

in reply to:  6 comment:7 by Gubaer, 15 years ago

Resolution: fixed
Status: closedreopened
Summary: [PATCH] Warn users in case of 409 Conflict from OSM APIMore verbose information about OSM API errors and user help on the wiki

Replying to framm:

JOSM was broken in that the OsmServerWriter still had the "retrying..." message which vanished after 5 seconds, but the OsmApi class only throws exceptions for errors that are not retryable. So I replaced the message in OsmServerWriter by one that requires pressing OK. I think it is still not perfect, I liked the extended information supplied by Gubaer's patch... ideally we should have some sort of generic "help" link given with the error messages so we could provide extensive documentation in the Wiki, what do you think?

Good idea. We could have a special OSMAPIException (inheriting from OsmTranferException?) which would remember

  • the status code
  • the error text from the Error header field

We could then notify users with a special error dialog which would include a link to a help page on the wike, something like http://www.openstreetmap.org/JOSM/APIHelp#409

The wiki page would consists of one section per status code. It would describe the error situation, the likely cause, the consequences and what action the user can take to avoid the errors in the future (i.e. download and merge before upload in order to avoid 409/conflicts).

comment:8 by VARTA, 15 years ago

Got the 409 error (1529) but the latest version (1566) didn't help. Now I get:
version mismatch provided 10, server had: 11 of way 24291578

comment:9 by Gubaer, 15 years ago

Ticket #2144 has been marked as a duplicate of this ticket.

comment:10 by Gubaer, 15 years ago

Ticket #2444 has been marked as a duplicate of this ticket.

in reply to:  8 comment:11 by smsm1, 15 years ago

Replying to VARTA:

Got the 409 error (1529) but the latest version (1566) didn't help. Now I get:
version mismatch provided 10, server had: 11 of way 24291578

That message means that someone else has updated the way 24291578 since you last downloaded, and you need to go to the file menu and choose the update command.

comment:12 by Gubaer, 15 years ago

Improved in r1663.

Closing.

comment:13 by Gubaer, 15 years ago

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.