DEPRECATION WARNING: Using `return`, `break` or `throw` to exit a transaction block
Author: bobyinCreated Nov 23, 2021Updated Oct 2, 2024
Labelsbug?
Hi
We hit this problem when upgrade rails to 6.1.4, found the error! function throw it, please help. Thanks
DEPRECATION WARNING: Using return, break or throw to exit a transaction block is
deprecated without replacement. If the throw came from
Timeout.timeout(duration), pass an exception class as a second
argument so it doesn't use throw to abort its block. This results
in the transaction being committed, but in the next release of Rails
it will rollback.

Source: ruby-grape/grape