To add to this - it's not that old versions of Minecraft cannot handle a rate limit, it's simply that the response in the case of a rate limit has changed to something which Java Edition misidentifies as a valid response. Past and current versions of Minecraft Java Edition use the presence or absence of an "error" field to distinguish error from successful responses respectively. However, the current payload in case of a rate limited response is:
{
"path" : "/session/minecraft/profile/<uuid>",
"errorType" : "Too Many Requests",
"developerMessage" : "Too Many Requests",
"details" : { }
}
This does not contain an error field and so AuthLib tries to construct a GameProfile where both ID and Name are null.
Adding in an "error" field with any string would be sufficient to resolve this issue.
To add to this - it's not that old versions of Minecraft cannot handle a rate limit, it's simply that the response in the case of a rate limit has changed to something which Java Edition misidentifies as a valid response. Past and current versions of Minecraft Java Edition use the presence or absence of an "error" field to distinguish error from successful responses respectively. However, the current payload in case of a rate limited response is:
This does not contain an error field and so AuthLib tries to construct a GameProfile where both ID and Name are null.
Adding in an "error" field with any string would be sufficient to resolve this issue.