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

Support for non-retryable transactions #22

Open
steve-chavez opened this issue Aug 10, 2024 · 1 comment
Open

Support for non-retryable transactions #22

steve-chavez opened this issue Aug 10, 2024 · 1 comment

Comments

@steve-chavez
Copy link

Currently hasql-transaction retries infinitely on code 40001 , this causes problems on replicas as mentioned on PostgREST/postgrest#3673.

Would it be possible to make the retrying behavior on both 40001 and 40P01 optional?

This is done here

"40001" -> onTransactionError
"40P01" -> onTransactionError

@nikita-volkov
Copy link
Owner

I guess the functions that execute transactions can be parameterized with a configuration of how error codes should be handled. PR is welcome

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

2 participants