]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/abstract_adapter.rb
Handle Timeout::Error exceptions which are caught by ActiveRecord.
[rails.git] / config / initializers / abstract_adapter.rb
index 24d7c56e1b5843480473011573b596d04ec2cb08..fbae428cbbc5cc9b2dbdbfef312db0694ea90f27 100644 (file)
@@ -15,6 +15,8 @@ module ActiveRecord
       rescue ActiveRecord::StatementInvalid => ex
         if ex.message =~ /^OSM::APITimeoutError: /
           raise OSM::APITimeoutError.new
+        elsif ex.message =~ /^Timeout::Error: /
+          raise Timeout::Error.new
         else
           raise
         end