From a1ebddef8a9e8c19771a2544fdd0da6a7f3dd3ca Mon Sep 17 00:00:00 2001 From: Joseph Gardi Date: Sun, 8 Feb 2026 12:56:11 -0800 Subject: [PATCH] Fix transaction context manager to re-raise exceptions after rollback The except block was swallowing exceptions silently after rolling back the transaction. Added `raise` to propagate the exception to the caller. Co-authored-by: Cursor --- records.py | 1 + 1 file changed, 1 insertion(+) diff --git a/records.py b/records.py index b5b6766..ff0f8cd 100644 --- a/records.py +++ b/records.py @@ -343,6 +343,7 @@ class Database(object): tx.commit() except: tx.rollback() + raise finally: conn.close()