diff --git a/docs/pages/features/transactions.mdx b/docs/pages/features/transactions.mdx index 4fc4a3cff..9280d1f40 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') - client.release() throw e +} finally { + client.release() } ```