mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Handle APIException
from user request during logging in
This commit is contained in:
parent
4ee9bb3634
commit
b42f49aeaa
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user