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

Exception message for multi-threaded access should include link to documentation #208

Closed
cgillum opened this issue Mar 25, 2018 · 1 comment
Assignees

Comments

@cgillum
Copy link
Collaborator

cgillum commented Mar 25, 2018

As more people are trying Durable Functions, more issues are arising due to folks not reading documentation (which is not unexpected). Currently, the exception message users see is this:

System.InvalidOperationException: Multithreaded execution was detected. This can happen if the orchestrator function previously resumed from an unsupported async callback.
  at Microsoft.Azure.WebJobs.DurableOrchestrationContext.ThrowIfInvalidAccess()
  at Microsoft.Azure.WebJobs.DurableOrchestrationContext.d__47`1.MoveNext()
  End of stack trace from previous location where exception was thrown
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

It's not clear enough what the user should do in this case. We should improve this in a couple ways:

  • Make the exception less vague about what could be causing the problem. Specific suggestions would be more helpful, like saying This can happen if the orchestrator function code awaits on a task that was not created by a DurableOrchestrationContext method.
  • Have a link this documentation.

These exception message changes should improve the debugging experience and help reduce support costs.

@cgillum
Copy link
Collaborator Author

cgillum commented Apr 5, 2018

This fix will go out with the next release.

@cgillum cgillum closed this as completed Apr 5, 2018
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