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 <cursoragent@cursor.com>
This commit is contained in:
Joseph Gardi
2026-02-08 12:56:11 -08:00
parent 5941ab2798
commit a1ebddef8a
+1
View File
@@ -343,6 +343,7 @@ class Database(object):
tx.commit()
except:
tx.rollback()
raise
finally:
conn.close()