Skip to content

Commit

Permalink
Don't translate log message
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Jan 25, 2022
1 parent e5f3bc2 commit 13bd9bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libsync/creds/oauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,21 @@ void OAuth::refreshAuthentication(const QString &refreshToken)
error == QLatin1String("invalid_request")) {
newRefreshToken.clear();
} else {
qCWarning(lcOauth) << tr("Error while refreshing the token: %1 : %2").arg(error, data.value(QStringLiteral("error_description")).toString());
qCWarning(lcOauth) << "Error while refreshing the token:" << error << data.value(QStringLiteral("error_description")).toString();
}
} else if (reply->error() != QNetworkReply::NoError) {
qCWarning(lcOauth) << tr("Error while refreshing the token: %1 : %2").arg(reply->errorString(), QString::fromUtf8(jsonData));
qCWarning(lcOauth) << "Error while refreshing the token:" << reply->error() << ":" << reply->errorString() << reply->attribute(QNetworkRequest::HttpStatusCodeAttribute) << jsonData;
Q_EMIT refreshError(reply->error(), reply->errorString());
return;
} else {
if (jsonParseError.error != QJsonParseError::NoError || data.isEmpty()) {
// Invalid or empty JSON: Network error maybe?
qCWarning(lcOauth) << tr("Error while refreshing the token: %1 : %2").arg(jsonParseError.errorString(), QString::fromUtf8(jsonData));
qCWarning(lcOauth) << "Error while refreshing the token:" << jsonParseError.errorString() << jsonData;
} else {
QString error;
accessToken = getRequiredField(data, QStringLiteral("access_token"), &error).toString();
if (!error.isEmpty()) {
qCWarning(lcOauth) << tr("The reply from the server did not contain all expected fields\n:%1\nReceived data: %2").arg(error, QString::fromUtf8(jsonData));
qCWarning(lcOauth) << "The reply from the server did not contain all expected fields:" << error << "received data:" << jsonData;
}

const auto refresh_token = data.find(QStringLiteral("refresh_token"));
Expand Down

0 comments on commit 13bd9bd

Please sign in to comment.