+ rescue OSM::APIChangesetAlreadyClosedError => ex
+ return [-1, "The changeset #{ex.changeset.id} was closed at #{ex.changeset.closed_at}"]
+ rescue OSM::APIVersionMismatchError => ex
+ # Really need to check to see whether this is a server load issue, and the
+ # last version was in the same changeset, or belongs to the same user, then
+ # we can return something different
+ return [-3, "Sorry, someone else has changed this way since you started editing. Please click the 'Edit' tab to reload the area."]
+ rescue OSM::APIAlreadyDeletedError => ex
+ return [-1, "The way has already been deleted."]
+ rescue OSM::APIError => ex
+ # Some error that we don't specifically catch
+ return [-2, "Something really bad happened :-( ."]