Opened 16 years ago
Closed 16 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)
Change History (14)
by , 16 years ago
Attachment: | OSMAPI-conflict-patch.txt added |
---|
comment:1 by , 16 years ago
Cc: | 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 , 16 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 , 16 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:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch for OsmServerWriter.java obsolete. Now generic message dialog with error message (OsmServerWriter 1546 by framm).
follow-up: 7 comment:6 by , 16 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?
comment:7 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | [PATCH] Warn users in case of 409 Conflict from OSM API → More 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).
follow-up: 11 comment:8 by , 16 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:11 by , 16 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:13 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
patch