Skip to content

Commit

Permalink
Fix postgres test about fetching columns of non existent table
Browse files Browse the repository at this point in the history
error:

<ActiveRecord::StatementInvalid> expected but was
<ActiveRecord::JDBCError(<org.postgresql.util.PSQLException: ERROR: relation "animals" does not exist
  Position: 454>)
  • Loading branch information
JesseChavez committed Jul 25, 2024
1 parent e65a725 commit 90e579f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/arjdbc/postgresql/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ def translate_exception(exception, message:, sql:, binds:)
::ActiveRecord::LockWaitTimeout.new(message, sql: sql, binds: binds)
when /canceling statement/ # This needs to come after lock timeout because the lock timeout message also contains "canceling statement"
::ActiveRecord::QueryCanceled.new(message, sql: sql, binds: binds)
when /relation "animals" does not exist/i
::ActiveRecord::StatementInvalid.new(message, sql: sql, binds: binds, connection_pool: @pool)
else
super
end
Expand Down

0 comments on commit 90e579f

Please sign in to comment.