Skip to content

InvalidOperationException with message "An error occurred when attempting to complete the transaction context" #1180

Answered by michielvoo
michielvoo asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks again for your help @mookid8000.

The problem was that we removed DefaultRetryStep. Probably because we wanted to rely on Azure Service Bus for retries and dead-lettering (and use our logs to diagnose the root cause of dead-lettered messages, since we always log correlation ID and message ID). This was in the v6 timeframe, and back then removing the step did not cause any problems. But after updating to v8 removing the default retry step started causing problems, because that is the step that is responsible for calling SetResult() (here).

Solution: don't remove the default retry step, and instead learn how to take advantage of the retry mechanism it offers.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mookid8000
Comment options

Answer selected by michielvoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants