X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/77797b21b0701654f9a7ee57aace7fa16214e9c2..f1fc31d485eb310781600645df43b3f45a76fd57:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index 65eab6907..dd273418e 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -8,7 +8,7 @@ module OSM # The base class for API Errors. class APIError < RuntimeError def initialize(message = "Generic API Error") - super(message) + super end def status @@ -364,6 +364,17 @@ module OSM end end + # Raised when a size limit is exceeded + class APISizeLimitExceeded < APIError + def initialize + super("Size limit exceeded") + end + + def status + :payload_too_large + end + end + # Helper methods for going to/from mercator and lat/lng. class Mercator include Math