File: packages/drizzle/src/transactions/commitTransaction.ts:20
Same unguarded session map access as the MongoDB adapter. this.sessions[transactionID] can be undefined if the transaction ID was never registered, and session.resolve() throws in that case.
Severity: CRITICAL [high confidence]
Pattern:
const session = this.sessions[transactionID];
delete this.sessions[transactionID];
session.resolve(transactionID); // throws if session was undefined
Fix:
const session = this.sessions[transactionID];
if (!session) throw new Error(`No active transaction: ${transactionID}`);
delete this.sessions[transactionID];
session.resolve(transactionID);
Found via AXIOM — static invariant analysis tool that detects untested null assumptions.
File:
packages/drizzle/src/transactions/commitTransaction.ts:20Same unguarded session map access as the MongoDB adapter.
this.sessions[transactionID]can beundefinedif the transaction ID was never registered, andsession.resolve()throws in that case.Severity: CRITICAL [high confidence]
Pattern:
Fix:
Found via AXIOM — static invariant analysis tool that detects untested null assumptions.