Catches database errors when a transaction is committed

[#83500056]