Skip to content

Commit

Permalink
Add HttpRequestData null handling (#2786)
Browse files Browse the repository at this point in the history
Add HttpRequestData null handling in CreateCheckStatusResponse.
  • Loading branch information
jaliyaudagedara authored Apr 25, 2024
1 parent 182013e commit 2c2b51c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Worker.Extensions.DurableTask/DurableTaskClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public static async Task<HttpResponseData> CreateCheckStatusResponseAsync(
throw new ArgumentNullException(nameof(client));
}

if (request is null)
{
throw new ArgumentNullException(nameof(request));
}

HttpResponseData response = request.CreateResponse(statusCode);
object payload = SetHeadersAndGetPayload(client, request, response, instanceId);

Expand Down Expand Up @@ -102,6 +107,11 @@ public static HttpResponseData CreateCheckStatusResponse(
throw new ArgumentNullException(nameof(client));
}

if (request is null)
{
throw new ArgumentNullException(nameof(request));
}

HttpResponseData response = request.CreateResponse(statusCode);
object payload = SetHeadersAndGetPayload(client, request, response, instanceId);

Expand Down

0 comments on commit 2c2b51c

Please sign in to comment.