Skip to content

Commit 2213321

Browse files
committed
fix: adds missing cancellation token parameter
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent f29e4cd commit 2213321

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Microsoft.Graph.Core/Requests/BatchRequestBuilder.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ private static async Task ThrowIfFailedResponseAsync(HttpResponseMessage httpRes
123123
var responseStringContent = string.Empty;
124124
if (httpResponseMessage.Content != null)
125125
{
126+
#if NET5_0_OR_GREATER
127+
responseStringContent = await httpResponseMessage.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
128+
#else
126129
responseStringContent = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
130+
#endif
127131
}
128132

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

0 commit comments

Comments
 (0)