Skip to content

fix: remove catch from handler in transaction - #444

Closed
charsleysa wants to merge 3 commits into
porsager:masterfrom
charsleysa:fix-errors
Closed

charsleysa wants to merge 3 commits into
porsager:masterfrom
charsleysa:fix-errors

Conversation

@charsleysa

Copy link
Copy Markdown

Fixes an issue where catching an error inside a transaction and running custom error logic doesn't work due to a hidden catch and rethrow occurring.

@skarbovskiy

Copy link
Copy Markdown

@porsager Are there any plans to merge this?

@mattbishop

Copy link
Copy Markdown

@charsleysa why does this PR have the docker file changes?

@charsleysa

Copy link
Copy Markdown
Author

@mattbishop those were config files added for working in VSCode isolated workspaces. I can remove them if it's blocking the PR.

@isaac-mcfadyen

Copy link
Copy Markdown

Any thoughts on when this can be merged?

@porsager

Copy link
Copy Markdown
Owner

Thanks. v4 keeps the v3 behaviour: an error caught inside sql.begin still rolls the transaction back and rejects it, as PostgreSQL has aborted the transaction anyway. Use a savepoint (sql.savepoint) to recover from an error and go on.

@porsager porsager closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants