You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling TerminateInstanceAsync() in dotnet-isolated on an orchestration ID that is already completed, terminated, or otherwise not eligable for termination, you get an RpcException with the following message:
Status(StatusCode="Unknown", Detail="Exception was thrown by handler.")
This is unhelpful and we are losing the detail provided by the exception thrown here:
thrownewInvalidOperationException($"Cannot terminate the orchestration instance {instanceId} because instance is in the {state.OrchestrationStatus} state.");
Expected behavior
Terminating an invalid orchestration should throw an exception with a helpful stack trace and error message.
Actual behavior
Terminating a scheduled orchestration throws a generic RpcException.
Relevant source code snippets
[Function("TerminateInstance")]publicstaticasyncTask<HttpResponseData>Run([HttpTrigger(AuthorizationLevel.Anonymous,"get","post")]HttpRequestDatareq,[DurableClient]DurableTaskClientclient,stringinstanceId){stringreason="Long-running orchestration was terminated early.";try{awaitclient.TerminateInstanceAsync(instanceId,reason);returnreq.CreateResponse(HttpStatusCode.OK);}catch(RpcExceptionex){varresponse=req.CreateResponse(HttpStatusCode.BadRequest);response.Headers.Add("Content-Type","text/plain");awaitresponse.WriteStringAsync(ex.Message);returnresponse;}}
Description
When calling TerminateInstanceAsync() in dotnet-isolated on an orchestration ID that is already completed, terminated, or otherwise not eligable for termination, you get an RpcException with the following message:
Status(StatusCode="Unknown", Detail="Exception was thrown by handler.")
This is unhelpful and we are losing the detail provided by the exception thrown here:
azure-functions-durable-extension/src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableClient.cs
Line 399 in 3bfd149
Expected behavior
Actual behavior
Relevant source code snippets
Known workarounds
None
App Details
Latest Durable worker extension **1.2.2/dotnet-isolated/FunctionsV4
The text was updated successfully, but these errors were encountered: