Handle Timeout::Error exceptions which are caught by ActiveRecord.
This commit is contained in:
parent
841ebe80d7
commit
70bb55b35e
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue