mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Add Additional Logging to Self-hosted installs for F4E (#1999)
* Add logging to SH logs * Fix tests
This commit is contained in:
@ -87,6 +87,7 @@ namespace Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnte
|
||||
|
||||
if (response == null)
|
||||
{
|
||||
_logger.LogDebug("Organization sync failed for '{OrgId}'", organizationId);
|
||||
throw new BadRequestException("Organization sync failed");
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user