-
Notifications
You must be signed in to change notification settings - Fork 102
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
fix transaction async error handling that not thrown the full error #447
fix transaction async error handling that not thrown the full error #447
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@neverlan I went ahead and added some unit tests for this, if it looks good to you we'll get it merged! @JustinBeckwith I think I'm going to need some help with the cla |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
Throw the full error in runTransactionAsync method instead of e.message.
Issue:
If you throw an error in the callback function, after a read for example, the error is misformatted.
Example:
Also in version 2.1.0, Transaction.ABORTED is undefined in the error handler (https://github.com/googleapis/nodejs-spanner/blob/master/src/database.ts#L1591), meaning the transaction was never retrieved in case of transient failure. It was fixed in #408. We should publish a new version whenever it's possible.