Check for wrapped timeout errors properly.

This commit is contained in:
Tom Hughes 2009-05-21 21:55:30 +00:00
parent 2006c416d2
commit 4f6dc55683

View file

@ -13,7 +13,7 @@ module ActiveRecord
old_log(sql, name)
end
rescue ActiveRecord::StatementInvalid => ex
if ex =~ /^OSM::APITimeoutError: /
if ex.message =~ /^OSM::APITimeoutError: /
raise OSM::APITimeoutError.new
else
raise