diff --git a/docs/pages/features/transactions.mdx b/docs/pages/features/transactions.mdx index 9280d1f40..4fc4a3cff 100644 --- a/docs/pages/features/transactions.mdx +++ b/docs/pages/features/transactions.mdx @@ -31,10 +31,10 @@ try { const insertPhotoValues = [res.rows[0].id, 's3.bucket.foo'] await client.query(insertPhotoText, insertPhotoValues) await client.query('COMMIT') + client.release() } catch (e) { await client.query('ROLLBACK') - throw e -} finally { client.release() + throw e } ```