X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c809f79912a3b998ddf3a21973582254db564183..1998ec88b82f29f7ea3c65f41895a1e76a1ded5a:/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)