Opened 10 years ago

Last modified 5 years ago

#1874 new defect

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 (1)

comment:1 Changed 5 years ago by don-vip

Milestone: OSM 0.6
Priority: majorminor
Note: See TracTickets for help on using tickets.