mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 22:16:10 +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 =>
|
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");
|
log.Add(@"Login no longer valid");
|
||||||
Logout();
|
Logout();
|
||||||
|
Loading…
Reference in New Issue
Block a user