fix cloud error
This commit is contained in:
parent
25124cc295
commit
45e7f7d749
@ -40,7 +40,7 @@ public:
|
||||
CloudErrorNoError,
|
||||
CloudErrorAuthenticationFailed,
|
||||
CloudErrorCloudConnectionDisabled,
|
||||
CloudErrorIdentyServerNotReachable,
|
||||
CloudErrorIdentityServerNotReachable,
|
||||
CloudErrorProxyServerNotReachable,
|
||||
CloudErrorLoginCredentialsMissing
|
||||
};
|
||||
|
||||
@ -209,6 +209,14 @@ void CloudAuthenticator::replyFinished(QNetworkReply *reply)
|
||||
QByteArray data = reply->readAll();
|
||||
m_tokenRequests.removeAll(reply);
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
qCWarning(dcCloud()) << "Authenticator: Request token reply error:" << status << reply->errorString();
|
||||
m_error = Cloud::CloudErrorIdentityServerNotReachable;
|
||||
setAuthenticated(false);
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
// check HTTP status code
|
||||
if (status != 200) {
|
||||
qCWarning(dcCloud()) << "Authenticator: Request token reply HTTP error:" << status << reply->errorString();
|
||||
@ -250,6 +258,14 @@ void CloudAuthenticator::replyFinished(QNetworkReply *reply)
|
||||
QByteArray data = reply->readAll();
|
||||
m_refreshTokenRequests.removeAll(reply);
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
qCWarning(dcCloud()) << "Authenticator: Request token reply error:" << status << reply->errorString();
|
||||
m_error = Cloud::CloudErrorIdentityServerNotReachable;
|
||||
setAuthenticated(false);
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
// check HTTP status code
|
||||
if (status != 200) {
|
||||
qCWarning(dcCloud()) << "Authenticator: Refresh token reply HTTP error:" << status << reply->errorString();
|
||||
|
||||
@ -590,7 +590,7 @@
|
||||
"CloudErrorNoError",
|
||||
"CloudErrorAuthenticationFailed",
|
||||
"CloudErrorCloudConnectionDisabled",
|
||||
"CloudErrorIdentyServerNotReachable",
|
||||
"CloudErrorIdentityServerNotReachable",
|
||||
"CloudErrorProxyServerNotReachable",
|
||||
"CloudErrorLoginCredentialsMissing"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user