Skip to content

Commit 968d8f3

Browse files
Translate the connection timed out error
1 parent 25294c0 commit 968d8f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def translate_exception(e, message)
333333
NoDatabaseError.new(message)
334334
when /data would be truncated/
335335
ValueTooLong.new(message)
336+
when /connection timed out/
337+
StatementTimeout.new(message)
336338
when /Column '(.*)' is not the same data type as referencing column '(.*)' in foreign key/
337339
pk_id, fk_id = SQLServer::Utils.extract_identifiers($1), SQLServer::Utils.extract_identifiers($2)
338340
MismatchedForeignKey.new(

0 commit comments

Comments
 (0)