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

Azure Durable Function project/function template wrong because of client.CreateCheckStatusResponse #1533

Open
vijayrkn opened this issue May 8, 2024 · 0 comments

Comments

@vijayrkn
Copy link
Contributor

vijayrkn commented May 8, 2024

Creating the bug on behalf of the VS customer:

Link to the DevComm issue: https://developercommunity.visualstudio.com/t/Azure-Durable-Function-projectfunction-/10602888

[Ralph Jansen]

Reported Feb 27, 2024 1:02 PM
When creating a new Durable Function Orchestration function in an Azure Function will successfully generate the code.
Only the last line is wrong.

The last line is:

return client.CreateCheckStatusResponse(req, instanceId);
This is wrong because the Function is async and results in a response 500 error instead of the “Status response” of a durable function. See below for complete error.

The following line is the correct line:

return await client.CreateCheckStatusResponseAsync(req, instanceId);
When you execute the durable function (calling the HTTP trigger) with the generated (wrong) code will result in the following error and a 500 response:

Result: Function 'Function1_HttpStart', Invocation id '14c18dd9-5333-4103-ab0b-9a6f56a4ebc9': An exception was thrown by the invocation.
Exception: System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.

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

1 participant