Opened 9 years ago

Last modified 5 years ago

#1874 new defect

Wrong error on updates with no XML payload

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

Description

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 set to OSM 0.6
  • Priority changed from major to minor
Note: See TracTickets for help on using tickets.