1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Handle APIException from user request during logging in

This commit is contained in:
Salman Ahmed 2022-07-16 00:34:21 +03:00
parent 4ee9bb3634
commit b42f49aeaa

View File

@ -163,7 +163,13 @@ namespace osu.Game.Online.API
userReq.Failure += ex =>
{
if (ex is WebException webException && webException.Message == @"Unauthorized")
if (ex is APIException)
{
LastLoginError = ex;
log.Add("Login failed on local user retrieval!");
Logout();
}
else if (ex is WebException webException && webException.Message == @"Unauthorized")
{
log.Add(@"Login no longer valid");
Logout();