© 2026 Hedgehog Software, LLC
tx.rollback()
TransactionRollbackError
await db.transaction(async (tx) => { ...some logic if (logicFails) { tx.rollback(); throw new TRPCError({ code: "CONFLICT", message: "Detailed reason..." }); } });
await db.transaction(async (tx) => { ...some logic if (logicFails) { try { tx.rollback(); } catch (e) { }; throw new TRPCError({ code: "CONFLICT", message: "Detailed reason..." }); } });