Rethrow the error

This commit is contained in:
Alex Gleason 2024-09-24 16:20:42 -05:00
parent 3469374d8e
commit 9f02215c04
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -145,6 +145,8 @@ async function storeEvent(event: DittoEvent, signal?: AbortSignal): Promise<unde
// We can't catch this in the transaction because the error aborts the transaction on the Postgres side. // We can't catch this in the transaction because the error aborts the transaction on the Postgres side.
if (e instanceof Error && e.message.includes('event_stats' satisfies keyof DittoTables)) { if (e instanceof Error && e.message.includes('event_stats' satisfies keyof DittoTables)) {
await store.event(event, { signal }); await store.event(event, { signal });
} else {
throw e;
} }
} }
} }