X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2347761266d8848dcdc42f9e5d9ef380fa04b89a..e1b205913c9afd6b41684add7308cef4613112e2:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index a64aa8c48..3ddf10f98 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -33,6 +33,20 @@ module OSM end end + # Raised when the user logged in isn't the same as the changeset + class APIUserChangesetMismatchError < APIError + def render_opts + { :text => "The user doesn't own that changeset", :status => :conflict } + end + end + + # Raised when the changeset provided is already closed + class APIChangesetAlreadyClosedError < APIError + def render_opts + { :text => "The supplied changeset has already been closed", :status => :conflict } + end + end + # Raised when the provided version is not equal to the latest in the db. class APIVersionMismatchError < APIError def initialize(provided, latest)