Transaction rolling back without error

Hello all,

I'm trying to use Drizzle together with Supabase and SvelteKit to have transaction support. However, I've come across an issue which I'm having trouble understanding.

The following query is successful on it's own (the value of the variables is extracted from a form data):

                await db.insert(ticket).values({
                    ticketTypeId: ticketType,
                    description: description
                });


However, when I use inside a transaction, the transaction does NOT fail, but it does NOT write to the database either:

await db.transaction(async (tx) => {
                await tx.insert(ticket).values({
                    ticketTypeId: ticketType,
                    description: description
                });

            });
Was this page helpful?