X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2805118a6047fa9e5814d44003d993507222fb90..887f456209e1ed26016acaed51a8ffd1f6593f91:/lib/osm.rb 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