transaction not running if previous transactions fail
I have ultiple transaction in my code, inside a single try/catch. If a transaction fails, any transactions after it are never executed, despite them not being nested/connected in anyway.
4 Replies
I’m pretty sure it’s because if the transaction fails it will throw an error
I believe if an error is throw you can do nothing I believe and you have to handle that on a specific query
or you can use the .catch on the query to handle the specific error that gets thrown
But the transactions are all separate, one failing should not cause the ones below it to fail
if it's all within one try/catch like below, then that's just how Type/JavaScript works
if you want the errors to be caught but continue executing, you'd want something like this
Aha OK! So I need to wrap them in individual try/catch blocks and handle the various errors somehow, gotya