]> git.openstreetmap.org Git - rails.git/blobdiff - lib/osm.rb
Update iD, set locale
[rails.git] / lib / osm.rb
index 3da9671c13840ccca0e61de2df5ca00626d14d36..393011dac563a4e205b7511c6f4a62e7f2c2f769 100644 (file)
@@ -281,6 +281,23 @@ module OSM
     end
   end
 
+  # Raised when the note provided is already closed
+  class APINoteAlreadyClosedError < APIError
+    def initialize(note)
+      @note = note
+    end
+
+    attr_reader :note
+
+    def status
+      :conflict
+    end
+
+    def to_s
+      "The note #{@note.id} was closed at #{@note.closed_at}"
+    end
+  end
+
   # Helper methods for going to/from mercator and lat/lng.
   class Mercator
     include Math