From 576668dce6f251ed045b75a484663c321c199bde Mon Sep 17 00:00:00 2001 From: Pavel Yaumenau Date: Wed, 22 Apr 2026 15:02:08 +0300 Subject: [PATCH] ref --- client/core/api/apiUtils.cpp | 3 +++ client/core/controllers/gatewayController.cpp | 4 +--- client/ui/controllers/api/apiConfigsController.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/core/api/apiUtils.cpp b/client/core/api/apiUtils.cpp index 92723a046..b5195a1fd 100644 --- a/client/core/api/apiUtils.cpp +++ b/client/core/api/apiUtils.cpp @@ -153,6 +153,9 @@ amnezia::ErrorCode apiUtils::checkNetworkReplyErrors(const QList &ssl qDebug().noquote() << sslErrors; return amnezia::ErrorCode::ApiConfigSslError; } + if (replyError == QNetworkReply::NoError) { + return amnezia::ErrorCode::NoError; + } if (replyError == QNetworkReply::NetworkError::OperationCanceledError || replyError == QNetworkReply::NetworkError::TimeoutError) { qDebug() << replyError; diff --git a/client/core/controllers/gatewayController.cpp b/client/core/controllers/gatewayController.cpp index 80ec9e383..5430cd7b6 100644 --- a/client/core/controllers/gatewayController.cpp +++ b/client/core/controllers/gatewayController.cpp @@ -246,7 +246,6 @@ ErrorCode GatewayController::post(const QString &endpoint, const QJsonObject api auto errorCode = apiUtils::checkNetworkReplyErrors(sslErrors, replyErrorString, replyError, httpStatusCode, decryptionResult.decryptedBody); if (errorCode) { - responseBody = decryptionResult.decryptedBody; return errorCode; } @@ -321,8 +320,7 @@ QFuture> GatewayController::postAsync(const QString promise->finish(); }; - if (!plaintextMock && sslErrors->isEmpty() - && shouldBypassProxy(replyError, decryptionResult.decryptedBody, decryptionResult.isDecryptionSuccessful)) { + if (!plaintextMock && sslErrors->isEmpty() && shouldBypassProxy(replyError, decryptionResult.decryptedBody, decryptionResult.isDecryptionSuccessful)) { auto serviceType = apiPayload.value(apiDefs::key::serviceType).toString(""); auto userCountryCode = apiPayload.value(apiDefs::key::userCountryCode).toString(""); diff --git a/client/ui/controllers/api/apiConfigsController.h b/client/ui/controllers/api/apiConfigsController.h index a7ad04697..f732d7cc3 100644 --- a/client/ui/controllers/api/apiConfigsController.h +++ b/client/ui/controllers/api/apiConfigsController.h @@ -83,7 +83,6 @@ private: QSharedPointer m_subscriptionPlansModel; QSharedPointer m_benefitsModel; - // CAPTCHA handling state struct CaptchaState { QJsonObject apiPayload; QString endpoint;