mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-11 05:57:21 +01:00
add some more logging
This commit is contained in:
parent
a4c760af25
commit
2e7672c440
1 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ public class ExistingUserRequirementHandler : AuthorizationHandler<ExistingUserR
|
||||||
if (uid == null)
|
if (uid == null)
|
||||||
{
|
{
|
||||||
context.Fail();
|
context.Fail();
|
||||||
|
_logger.LogWarning("Failed to find UID in claims");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,10 +35,12 @@ public class ExistingUserRequirementHandler : AuthorizationHandler<ExistingUserR
|
||||||
if (discordIdString == null)
|
if (discordIdString == null)
|
||||||
{
|
{
|
||||||
context.Fail();
|
context.Fail();
|
||||||
|
_logger.LogWarning("Failed to find DiscordId in claims");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!ulong.TryParse(discordIdString, out ulong discordId))
|
if (!ulong.TryParse(discordIdString, out ulong discordId))
|
||||||
{
|
{
|
||||||
|
_logger.LogWarning("Failed to parse DiscordId");
|
||||||
context.Fail();
|
context.Fail();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -52,6 +55,7 @@ public class ExistingUserRequirementHandler : AuthorizationHandler<ExistingUserR
|
||||||
}
|
}
|
||||||
if (!existingUser.Exists)
|
if (!existingUser.Exists)
|
||||||
{
|
{
|
||||||
|
_logger.LogWarning("Failed to find Mare User {User} in DB", uid);
|
||||||
context.Fail();
|
context.Fail();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -65,6 +69,7 @@ public class ExistingUserRequirementHandler : AuthorizationHandler<ExistingUserR
|
||||||
|
|
||||||
if (!existingDiscordUser.Exists)
|
if (!existingDiscordUser.Exists)
|
||||||
{
|
{
|
||||||
|
_logger.LogWarning("Failed to find Discord User {User} in DB", discordId);
|
||||||
context.Fail();
|
context.Fail();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue