diff --git a/wrapper/VRChat.API/Client/VRChat.cs b/wrapper/VRChat.API/Client/VRChat.cs index fba7e622..8d588e06 100644 --- a/wrapper/VRChat.API/Client/VRChat.cs +++ b/wrapper/VRChat.API/Client/VRChat.cs @@ -372,7 +372,14 @@ public async Task TryLoginAsync(CancellationToken ct = defaul return new VRChatLoginResult(false, exception); } - return new VRChatLoginResult(user == null, null); + if (user != null) + return new VRChatLoginResult(true, null); + + // LoginAsync returns null when the final GetCurrentUser response was not 200 OK, and + // discards the status. Surface a concrete exception rather than reporting failure with + // no explanation, which is indistinguishable from a bug in the caller. + return new VRChatLoginResult(false, new UnauthorizedAccessException( + "Login did not complete: VRChat did not return a current user.")); } ///