diff options
author | kumquat-ir <66188216+kumquat-ir@users.noreply.github.com> | 2022-07-31 14:54:50 -0400 |
---|---|---|
committer | kumquat-ir <66188216+kumquat-ir@users.noreply.github.com> | 2022-07-31 14:54:50 -0400 |
commit | 579582740e9efd5a054b02a8b0e1d8999abfa6fa (patch) | |
tree | 5b07ba3387dfebabd68e534d79f7bf7363aad67c /launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp | |
parent | 20b1723e78149c1f2ac4072cbd46997e9c5160fa (diff) | |
parent | b15544c163ccbca08ea498b3b3a51c82d7fb3e12 (diff) | |
download | PrismLauncher-579582740e9efd5a054b02a8b0e1d8999abfa6fa.tar.gz PrismLauncher-579582740e9efd5a054b02a8b0e1d8999abfa6fa.tar.bz2 PrismLauncher-579582740e9efd5a054b02a8b0e1d8999abfa6fa.zip |
Merge remote-tracking branch 'origin/develop' into download-all-blocked
Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp')
-rw-r--r-- | launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp b/launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp index 589768e3..14bde47e 100644 --- a/launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp +++ b/launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp @@ -6,6 +6,7 @@ #include "minecraft/auth/AuthRequest.h" #include "minecraft/auth/Parsers.h" +#include "net/NetUtils.h" XboxAuthorizationStep::XboxAuthorizationStep(AccountData* data, Katabasis::Token *token, QString relyingParty, QString authorizationKind): AuthStep(data), @@ -62,10 +63,24 @@ void XboxAuthorizationStep::onRequestDone( #endif if (error != QNetworkReply::NoError) { qWarning() << "Reply error:" << error; - if(!processSTSError(error, data, headers)) { + if (Net::isApplicationError(error)) { + if(!processSTSError(error, data, headers)) { + emit finished( + AccountTaskState::STATE_FAILED_SOFT, + tr("Failed to get authorization for %1 services. Error %2.").arg(m_authorizationKind, error) + ); + } + else { + emit finished( + AccountTaskState::STATE_FAILED_SOFT, + tr("Unknown STS error for %1 services: %2").arg(m_authorizationKind, requestor->errorString_) + ); + } + } + else { emit finished( - AccountTaskState::STATE_FAILED_SOFT, - tr("Failed to get authorization for %1 services. Error %2.").arg(m_authorizationKind, error) + AccountTaskState::STATE_OFFLINE, + tr("Failed to get authorization for %1 services: %2").arg(m_authorizationKind, requestor->errorString_) ); } return; |