Merge pull request #5286 from arthomnix/xerr

NOISSUE Add more XErr error descriptions
This commit is contained in:
Petr Mrázek 2024-02-01 17:37:30 +01:00 committed by GitHub
commit 87852db4ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,6 @@
#include <QNetworkRequest>
#include <QJsonParseError>
#include <QJsonDocument>
#include "minecraft/auth/AuthRequest.h"
#include "minecraft/auth/Parsers.h"
@ -121,7 +120,22 @@ bool XboxAuthorizationStep::processSTSError(
return true;
}
switch(errorCode) {
case 2148916233:{
case 2148916227: {
// NOTE: this is the error experienced by a number of people on Discord using dodgy alt accounts
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("Your XBox Live account has been banned by Microsoft for violating the XBox Community Standards.\nThis may happen if your account was shared or resold.")
);
return true;
}
case 2148916229: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account is linked to a family and your parent or guardian has not given you permission to play online.")
);
return true;
}
case 2148916233: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account does not have an XBox Live profile. Buy the game on %1 first.")
@ -129,6 +143,13 @@ bool XboxAuthorizationStep::processSTSError(
);
return true;
}
case 2148916234: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This account has not accepted the XBox Terms of Service. Please log in online and accept them.")
);
return true;
}
case 2148916235: {
// NOTE: this is the Grulovia error
emit finished(
@ -137,11 +158,26 @@ bool XboxAuthorizationStep::processSTSError(
);
return true;
}
case 2148916236: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account requires proof of age to play. Please login to %1 to provide proof of age.")
.arg("<a href=\"https://login.live.com/login.srf\">login.live.com</a>")
);
return true;
}
case 2148916237: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account has reached its playtime limit and has been blocked from logging in.")
);
return true;
}
case 2148916238: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account is underaged and is not linked to a family.\n\nPlease set up your account according to %1.")
.arg("<a href=\"https://help.minecraft.net/hc/en-us/articles/4403181904525\">help.minecraft.net</a>")
.arg("<a href=\"https://help.minecraft.net/hc/en-us/articles/4408968616077\">help.minecraft.net</a>")
);
return true;
}