]> git.openstreetmap.org Git - rails.git/blobdiff - lib/osm.rb
Add a reopen API call for notes
[rails.git] / lib / osm.rb
index ba28378f398c52610140cc6d04c6c2f3a0b1c492..d4c13ad7feab520f97d1f207b46ac3e36ef3528a 100644 (file)
@@ -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)