diff --git a/src/SnD.ApiClient/Boxer/BoxerTokenProvider.cs b/src/SnD.ApiClient/Boxer/BoxerTokenProvider.cs index 6551c40..b011497 100644 --- a/src/SnD.ApiClient/Boxer/BoxerTokenProvider.cs +++ b/src/SnD.ApiClient/Boxer/BoxerTokenProvider.cs @@ -54,6 +54,7 @@ public async Task GetTokenAsync(bool refresh, CancellationToken cancella request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", externalToken); return await httpClient.SendAsync(request, cancellationToken); }); + response.EnsureSuccessStatusCode(); this.token = await response.Content.ReadAsStringAsync(cancellationToken); this.logger.LogInformation("Received boxer token"); }