]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/abstract_adapter.rb
Tell users their account has been suspended when they try and login
[rails.git] / config / initializers / abstract_adapter.rb
index cfa32e4e93325336f979fd4289bfd701398913f1..5cc24d25c38489183a869661f7f3c68db3227a83 100644 (file)
@@ -13,8 +13,10 @@ module ActiveRecord
           old_log(sql, name)
         end
       rescue ActiveRecord::StatementInvalid => ex
-        if ex =~ /^OSM::APITimeoutError: /
+        if ex.message =~ /^OSM::APITimeoutError: /
           raise OSM::APITimeoutError.new
+        elsif ex.message =~ /^Timeout::Error: /
+          raise Timeout::Error.new("time's up!")
         else
           raise
         end