Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User requested rollbacks #169

Open
mbyio opened this issue May 17, 2023 · 0 comments
Open

User requested rollbacks #169

mbyio opened this issue May 17, 2023 · 0 comments

Comments

@mbyio
Copy link

mbyio commented May 17, 2023

I have a use case where I want to a dry run of the transaction, and rollback right before returning. The docs are not very clear about the preferred way to achieve this. I decided to return my own error object that I can check for to know that it isn't a real error.

It would be nicer if this library defined a special ErrRollback value, and if it sees that value, rollback the transaction instead of committing, and then also don't return any error to the outer function. It would simplify the error handling code a bit.

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

No branches or pull requests

1 participant