Opened 10 years ago

Closed 10 years ago

#1783 closed defect (fixed)

412 Precondition failed doesn't help

Reported by: Frank Weber Owned by: Tom Hughes
Priority: major Milestone:
Component: api Version:
Keywords: Cc: Shaun McDonald

Description

Currently I'm stuck having quite a few changes but can't upload them (as diff with JOSM) since the server replies with "Precondition failed" - that doesn't help me even a bit.

Please please make the error message more verbose containing which precondition on which element. That would be a huge help to fix such a problem.

Attachments (1)

PreconTest2.osm (2.5 KB) - added by Frank Weber 10 years ago.
file that on upload produces an empty 412

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Tom Hughes

Resolution: invalid
Status: newclosed

One of the new features of API 0.6 is that it does indeed return details of what it wrong in the body of the HTTP response. If your client isn't showing that to you then you need to complain to the authors of that client.

comment:2 Changed 10 years ago by Frank Weber

Resolution: invalid
Status: closedreopened

Err sorry, I tried hard to find any hints help me saving my edits but there simply isn't any. Sniffing the wire with Wireshark showed me:

HTTP/1.1 412 Precondition Failed
Content-Type: text/plain; charset=utf-8
X-Runtime: 0.11828
Cache-Control: no-cache
Content-Length: 0
Date: Sat, 02 May 2009 14:15:17 GMT
Server: lighttpd/1.4.19

and the body is really empty. I don't know if JOSM would show me any content, but at least in this case it isn't the clients fault.

comment:3 Changed 10 years ago by Shaun McDonald

Cc: Shaun McDonald added

comment:4 Changed 10 years ago by Shaun McDonald

Can you please attach the osm file, so that I can look into this futher and find the bit of code, which isn't producing the error message?

Changed 10 years ago by Frank Weber

Attachment: PreconTest2.osm added

file that on upload produces an empty 412

comment:5 in reply to:  4 Changed 10 years ago by Frank Weber

Replying to smsm1:

Can you please attach the osm file, so that I can look into this futher and find the bit of code, which isn't producing the error message?

Attached one. This isn't the originally problematic file as I finally somehow worked around the problem by investing quite some time and fiddling with it in an editor and don't have it anymore. Also I know what the problem in this file is and that this shouldn't happen by using an editor. But it somehow happened and got me in trouble.

Note that this not only occurs if a node gets action=delete though still being in a way but also a way gets action=delete though being in a relation.

comment:6 Changed 10 years ago by Thomas Wood

[*] I can confirm that the 412 works as expected with error message on local WebBrick? testing servers.

[*] I can confirm that the 412 works as expected with error message on api06.dev.openstreetmap.org.

[*] I can confirm that the 412 without specific error exists on the production server.

comment:7 Changed 10 years ago by Tom Hughes

Resolution: fixed
Status: reopenedclosed

This is caused by a lighttpd bug (http://redmine.lighttpd.net/issues/show/1055) and has been fixed by upgraded lighttpd to 1.4.22 on the live site.

Note: See TracTickets for help on using tickets.