X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2805118a6047fa9e5814d44003d993507222fb90..e8d32637c16aaba887a3c2c54eab68ab92da7f5b:/lib/osm.rb?ds=inline diff --git a/lib/osm.rb b/lib/osm.rb index 3da9671c1..393011dac 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -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