add some more logging
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user