Opened 16 years ago
Closed 17 months ago
#4093 closed enhancement (fixed)
Parse 412 error messages from API and offer corrective action
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | 412 | Cc: | bilbo, planemad |
Description (last modified by )
I tried to upload (see attachment) and got an error-message:
org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Way requires the nodes with id in (556645598), which either do not exist, or are not visible.>
isn`t there at least one ID missing.
I also do not know where this error comes from and thinks something with conflict-management is buggy
I attached 2 files (original + updated from server and conflict-management done)
and a log-file
Using /usr/lib/jvm/java-5-openjdk/bin/java to execute josm. Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2009-12-05 02:31:54 Last Changed Author: stoecker Revision: 2574 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2009-12-04 19:11:45 +0100 (Fri, 04 Dec 2009) Last Changed Rev: 2574 Error parsing gtk-icon-sizes string: '' loading ColumbusCSV loading buildings_tools loading editgpx loading osmarender loading utilsplugin loading validator loading waydownloader loading wmsplugin ....... GET http://www.openstreetmap.org/api/0.6/nodes?nodes=27279987 PUT http://www.openstreetmap.org/api/0.6/changeset/3295058... OK PUT http://www.openstreetmap.org/api/0.6/way/create... Precondition Failed Error header: Precondition failed: Way requires the nodes with id in (556645598), which either do not exist, or are not visible. 05.12.2009 14:47:00 org.openstreetmap.josm.actions.UploadAction handlePreconditionFailed WARNUNG: Warnung: die Fehlermeldung 'Precondition failed: Way requires the nodes with id in (556645598), which either do not exist, or are not visible.' stimmt nicht mit einem erwarteten Muster überein org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Way requires the nodes with id in (556645598), which either do not exist, or are not visible.> at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:561) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:448) at org.openstreetmap.josm.io.OsmApi.createPrimitive(OsmApi.java:240) at org.openstreetmap.josm.io.OsmServerWriter.makeApiRequest(OsmServerWriter.java:222) at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesIndividually(OsmServerWriter.java:98) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:202) at org.openstreetmap.josm.actions.UploadAction$UploadPrimitivesTask.realRun(UploadAction.java:631) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:63) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:105) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)
Attachments (1)
Change History (13)
by , 16 years ago
Attachment: | merzhausen_bug.tar.bz2 added |
---|
follow-up: 2 comment:1 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
That is the error message as it is returned by the API server. There is not much JOSM can do about this.
If you want to find the offending way you can search for "parent id:556645598".
comment:2 by , 16 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Type: | defect → enhancement |
Replying to mjulius:
That is the error message as it is returned by the API server. There is not much JOSM can do about this.
Yes, there is.
As with other error messages from the API server JOSM can parse it and provide a more user friendly feedback, including translation. In most cases it can even offer options to automatically handle the errors (see conflict handling routines which are triggered by HTTP 409 instead of HTTP 412 as described here).
See also #2882.
comment:3 by , 16 years ago
Summary: | missing id in error message → Parse 412 error messages from API and offer corrective action |
---|
comment:4 by , 14 years ago
Description: | modified (diff) |
---|---|
Keywords: | 412 added |
inserted log from tar.bz2
comment:7 by , 14 years ago
Cc: | added |
---|---|
Priority: | normal → major |
comment:8 by , 13 years ago
Cc: | added |
---|
comment:11 by , 17 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This ticket should not have been closed. In 2024 I am getting the same exact error message described in this ticket opened 14 years ago:
Errors occurred while trying to save
Precondition failed: Way -63 requires the nodes with id in 11365414266,11365414267,11365414268,11365430969,11365430970,11365430971,11365430972,11365430973,11365430974,11365430975,11365430976,11365430995,11367299006,11367299007, which either do not exist, or are not visible.
This occurred when I was trying to save after a very productive editing session. Does anyone have advice about how not to lose all of the edits I made?
Thanks
comment:12 by , 17 months ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
@gpspilot:
You problem does rather sounds similar to #23164, #23314 and similar recent tickets. We suspect a plugin to be the issue. Please create a new ticket with your status report and what actions of plugins you used during the session.
You should be able to save your data layer to a file. Please attach it to the new ticket.
In order to rescue your work you can try to download the missing nodes with Download Object using "nodes" and the list of ids of the non-existing or invisible nodes. If this does not work you need to modify the saved file in a text editor and look for <way id='-63'
and possible <member type='way' ref='-63'
. If the latter does not exist you can safely delete the way in deleting the block of lines starting with <way id='-63'
and ending with </way>
.
2 osm + log