X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3d0ca940d26bdc23aa791178b01b816185c5a086..b38684e59eef299e82f5858fe1e14f6cf2aaa10a:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index 274576206..f3a625c4e 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -197,6 +197,18 @@ module OSM end end + ## + # raised when an API call takes too long + class APITimeoutError < APIError + def render_opts + { :text => "Request timed out", :status => :request_timeout } + end + + def to_s + "Request timed out" + end + end + # Helper methods for going to/from mercator and lat/lng. class Mercator include Math