We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db03be5 commit a30689cCopy full SHA for a30689c
1 file changed
CloudConvert.API/WebApiHandler.cs
@@ -12,11 +12,12 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
12
{
13
try
14
15
- var response = await base.SendAsync(request, cancellationToken);
+ var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
16
17
if ((int)response.StatusCode >= 400)
18
19
- throw new WebApiException((await response.Content.ReadAsStringAsync(cancellationToken)).TrimLengthWithEllipsis(20000));
+ var errorBody = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
20
+ throw new WebApiException(errorBody.TrimLengthWithEllipsis(20000));
21
}
22
23
return response;
0 commit comments