X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/eac40b89af7f3a1c8b5bf6924640cf54a776e70b..d74d4f8d195673250c3f2e841d28f185d74d8849:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index ba28378f3..d4c13ad7f 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -298,6 +298,23 @@ module OSM end end + # Raised when the note provided is already open + class APINoteAlreadyOpenError < APIError + def initialize(note) + @note = note + end + + attr_reader :note + + def status + :conflict + end + + def to_s + "The note #{@note.id} is already open" + end + end + # raised when a two preferences have a duplicate key string. class APIDuplicatePreferenceError < APIError def initialize(key)