qertoip / transaction_isolation

Set transaction isolation level in the ActiveRecord in a database agnostic way.
MIT License
58 stars 34 forks source link

Getting an ArgumentError when passing an exception message back to mysql adapter in Rails 7.0.4 #14

Open mozcomp opened 8 months ago

mozcomp commented 8 months ago

ArgumentError: wrong number of arguments (given 2, expected 1; required keywords: message, sql, binds) when error raised without transaction isolation conflict

transaction_isolation-1.0.5/lib/transaction_isolation/active_record/connection_adapters/mysql2_adapter.rb:59

translate_exception_without_transaction_isolation_conflict( exception, message )

Signature for translate_exception method looks to have changed to named arguments ...

activerecord-7.0.4.3/lib/active_record/connection_adapters/mysql2_adapter.rb:161

def translate_exception(exception, message:, sql:, binds:)

iagopiimenta commented 5 months ago

I fixed it here: https://github.com/iagopiimenta/transaction_isolation_continued