X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d4954bc7b1bc06431bea4e97af401e3ea6acd0e6..5d3992daca978f714ff9d6758b6155b9f08ee3f5:/config/initializers/abstract_adapter.rb?ds=sidebyside diff --git a/config/initializers/abstract_adapter.rb b/config/initializers/abstract_adapter.rb index cfa32e4e9..5cc24d25c 100644 --- a/config/initializers/abstract_adapter.rb +++ b/config/initializers/abstract_adapter.rb @@ -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