Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion wrapper/VRChat.API/Client/VRChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,14 @@ public async Task<VRChatLoginResult> 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."));
}

/// <inheritdoc/>
Expand Down