Skip to content

Commit

Permalink
fix: adds missing cancellation token parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Sep 10, 2024
1 parent f29e4cd commit 2213321
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Microsoft.Graph.Core/Requests/BatchRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ private static async Task ThrowIfFailedResponseAsync(HttpResponseMessage httpRes
var responseStringContent = string.Empty;
if (httpResponseMessage.Content != null)
{
#if NET5_0_OR_GREATER
responseStringContent = await httpResponseMessage.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
#else
responseStringContent = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
#endif
}

throw new ServiceException(ErrorConstants.Messages.BatchRequestError, httpResponseMessage.Headers, (int)httpResponseMessage.StatusCode, responseStringContent);
Expand Down

0 comments on commit 2213321

Please sign in to comment.