ActiveRecord::TransactionRollbackError

TransactionRollbackError will be raised when a transaction is rolled back by the database due to a serialization failure or a deadlock.

See the following: