Skip to content

Commit

Permalink
Updating workflow get for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
  • Loading branch information
RyanLettieri committed May 4, 2023
1 parent fe2fe6b commit b3d88ba
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Dapr.Client/DaprClientGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,20 @@ public async override Task<GetWorkflowResponse> GetWorkflowAsync(
{
var options = CreateCallOptions(headers: null, cancellationToken);
var response = await client.GetWorkflowAlpha1Async(request, options);
if (response == null)
{
throw new DaprException("Get workflow operation failed: the object response is null");
}
if (response.CreatedAt == null)
{
response.CreatedAt = new Timestamp();
throw new DaprException("Get workflow operation failed: CreatedAt object response is null");
}
if (response.LastUpdatedAt == null)
{
response.LastUpdatedAt = new Timestamp();
throw new DaprException("Get workflow operation failed: LastUpdatedAt object response is null");
}
return new GetWorkflowResponse(response.InstanceId,
response.WorkflowName,
response.CreatedAt.ToDateTime(),
Expand Down

0 comments on commit b3d88ba

Please sign in to comment.