Skip to content

Commit

Permalink
edit error message to include inner ex
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid committed Apr 1, 2024
1 parent fc427f1 commit 1dc5dae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/WebJobs.Extensions.DurableTask/LocalGrpcListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,11 @@ public override Task<Empty> Hello(Empty request, ServerCallContext context)
InstanceId = instanceId,
};
}
catch (InvalidOperationException)
catch (InvalidOperationException ex)
{
throw new RpcException(new Status(StatusCode.AlreadyExists, $"An Orchestration instance with the ID {request.InstanceId} already exists."));
string errorMessage = $"Failed to start instance with ID {request.InstanceId}. Does this instance ID already exist?.\n" +
$"Inner exception: {ex}";
throw new RpcException(new Status(StatusCode.AlreadyExists, errorMessage));
}
}

Expand Down

0 comments on commit 1dc5dae

Please sign in to comment.