1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

Add Additional Logging to Self-hosted installs for F4E (#1999)

* Add logging to SH logs

* Fix tests
This commit is contained in:
Justin Baur
2022-05-16 09:57:00 -04:00
committed by GitHub
parent 6b484e29a7
commit 53241f16e0
5 changed files with 56 additions and 7 deletions

View File

@ -124,11 +124,19 @@ namespace Bit.Core.Services
if (!response.IsSuccessStatusCode)
{
_logger.LogInformation("Unsuccessful token response with status code {StatusCode}", response.StatusCode);
if (response.StatusCode == HttpStatusCode.BadRequest)
{
_nextAuthAttempt = DateTime.UtcNow.AddDays(1);
}
if (_logger.IsEnabled(LogLevel.Debug))
{
var responseBody = await response.Content.ReadAsStringAsync();
_logger.LogDebug("Error response body:\n{ResponseBody}", responseBody);
}
return false;
}