Modify

Opened 3 years ago

Closed 16 months ago

#4093 closed enhancement (fixed)

Parse 412 error messages from API and offer corrective action

Reported by: skyper Owned by: team
Priority: major Component: Core
Version: latest Keywords: 412
Cc: bilbo, arun.planemad@…

Description (last modified by skyper)

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 als 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)

merzhausen_bug.tar.bz2 (211.5 KB) - added by skyper 3 years ago.
2 osm + log

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by skyper

2 osm + log

comment:1 follow-up: Changed 3 years ago by mjulius

  • Resolution set to invalid
  • Status changed from new to 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 in reply to: ↑ 1 Changed 3 years ago by Gubaer

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Type changed from defect to 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 Changed 3 years ago by mjulius

  • Summary changed from missing id in error message to Parse 412 error messages from API and offer corrective action

comment:4 Changed 17 months ago by skyper

  • Description modified (diff)
  • Keywords 412 added

inserted log from tar.bz2

comment:5 Changed 17 months ago by skyper

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

comment:6 Changed 17 months ago by skyper

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

comment:7 Changed 17 months ago by skyper

  • Cc bilbo added
  • Priority changed from normal to major

comment:8 Changed 17 months ago by Arun Ganesh <arun.planemad@…>

  • Cc arun.planemad@… added

comment:9 Changed 17 months ago by Don-vip

In [4691/josm]:

see #4093 - More user-friendly error message with failed precondition (HTTP 412) related to nodes still used by ways

comment:10 Changed 16 months ago by simon04

  • Resolution set to fixed
  • Status changed from reopened to closed

In [4816/josm]:

fix #7257, fix #4093 - Provide an option to automatically download elements after a reference error

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.