mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Standardise exception messages for local-user-logged-out flows
This commit is contained in:
@ -400,7 +400,7 @@ namespace osu.Game.Online.API
|
||||
{
|
||||
if (state.Value == APIState.Offline)
|
||||
{
|
||||
request.Fail(new WebException("Disconnected from server"));
|
||||
failFromAPIOffline(request);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -419,7 +419,7 @@ namespace osu.Game.Online.API
|
||||
if (failOldRequests)
|
||||
{
|
||||
foreach (var req in oldQueueRequests)
|
||||
req.Fail(new WebException(@"Disconnected from server"));
|
||||
failFromAPIOffline(req);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -440,6 +440,13 @@ namespace osu.Game.Online.API
|
||||
flushQueue();
|
||||
}
|
||||
|
||||
private void failFromAPIOffline(APIRequest req)
|
||||
{
|
||||
Debug.Assert(state.Value == APIState.Offline);
|
||||
|
||||
req.Fail(new WebException(@"User not logged in"));
|
||||
}
|
||||
|
||||
private static APIUser createGuestUser() => new GuestUser();
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Reference in New Issue
Block a user