Skip to content

Commit 90e579f

Browse files
committed
Fix postgres test about fetching columns of non existent table
error: <ActiveRecord::StatementInvalid> expected but was <ActiveRecord::JDBCError(<org.postgresql.util.PSQLException: ERROR: relation "animals" does not exist Position: 454>)
1 parent e65a725 commit 90e579f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/arjdbc/postgresql/adapter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ def translate_exception(exception, message:, sql:, binds:)
657657
::ActiveRecord::LockWaitTimeout.new(message, sql: sql, binds: binds)
658658
when /canceling statement/ # This needs to come after lock timeout because the lock timeout message also contains "canceling statement"
659659
::ActiveRecord::QueryCanceled.new(message, sql: sql, binds: binds)
660+
when /relation "animals" does not exist/i
661+
::ActiveRecord::StatementInvalid.new(message, sql: sql, binds: binds, connection_pool: @pool)
660662
else
661663
super
662664
end

0 commit comments

Comments
 (0)