Opened 11 years ago

Closed 8 weeks ago

#1874 closed defect (worksforme)

Wrong error on updates with no XML payload

Reported by: randomjunk Owned by: Shaun McDonald
Priority: minor Milestone: OSM 0.6
Component: api Version:
Keywords: Cc:


If you do a delete request, but either forget the XML payload, or else your wonderful library strips it for you, the API returns a 500 error complaining of a TypeError?.

This is because the from_xml calls don't check for xml.nil? or an empty payload, and then don't rescue the TypeError? that ends up being thrown.

This case should be caught and a helpful 400 error returned instead.

Change History (2)

comment:1 Changed 6 years ago by don-vip

Milestone: OSM 0.6
Priority: majorminor

comment:2 Changed 8 weeks ago by mmd

Resolution: worksforme
Status: newclosed


Response HTTP 400 with body "Cannot parse valid way from xml string . Must specify a string with one or more characters"

-> closing here.

Note: See TracTickets for help on using tickets.