Skip to content

Commit 8ac1b6a

Browse files
authored
Ensure successful status code check for token response (#67)
1 parent 87ff043 commit 8ac1b6a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/SnD.ApiClient/Boxer/BoxerTokenProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public async Task<string> GetTokenAsync(bool refresh, CancellationToken cancella
5454
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", externalToken);
5555
return await httpClient.SendAsync(request, cancellationToken);
5656
});
57+
response.EnsureSuccessStatusCode();
5758
this.token = await response.Content.ReadAsStringAsync(cancellationToken);
5859
this.logger.LogInformation("Received boxer token");
5960
}

0 commit comments

Comments
 (0)