Skip to content

Commit

Permalink
Don't log errors for user ID not found (#1055)
Browse files Browse the repository at this point in the history
These are spamming the error logs when it's an expected case if someone
logs into the website (calling /api/user/me) with a BaaS account that
doesn't have a dawnshard device account linked
  • Loading branch information
SapiensAnatis authored Aug 27, 2024
1 parent b1b82e9 commit cebfe78
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DragaliaAPI/DragaliaAPI/Services/Api/BaasApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ await savefileResponse.Content.ReadFromJsonAsync<

HttpResponseMessage response = await client.SendAsync(request);

if (response.StatusCode == HttpStatusCode.NotFound)
{
this.logger.LogDebug("GetUserId returned 404 Not Found.");
return null;
}

if (!response.IsSuccessStatusCode)
{
this.logger.LogError(
Expand Down

0 comments on commit cebfe78

Please sign in to comment.