TransactionRollbackError will be raised when a transaction is rolled back by the database due to a serialization failure or a deadlock.
See the following:
www.postgresql.org/docs/current/static/transaction-iso.html
dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_lock_deadlock
© 2004–2018 David Heinemeier HanssonLicensed under the MIT License.