X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/eea25bd1546a42b783ffffb4d0c794d59e643597..22e079a3c3c98fe3cf3b727732af0b2c92ff075f:/lib/osm.rb?ds=sidebyside diff --git a/lib/osm.rb b/lib/osm.rb index 4241ad700..905f3ac97 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -353,6 +353,17 @@ module OSM end end + # Raised when a rate limit is exceeded + class APIRateLimitExceeded < APIError + def initialize + super "Rate limit exceeded" + end + + def status + :too_many_requests + end + end + # Helper methods for going to/from mercator and lat/lng. class Mercator include Math