diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-02 22:55:50 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-02 22:55:50 +0900 |
commit | 381089a0404eecbb693f5c7cb1000ecf3f58f4cc (patch) | |
tree | 86a838160e0b564ebf881478e51d514b57fdbaf4 | |
parent | bf78bd17a485dff30da670c91c0c1571e624edf0 (diff) | |
download | libquotient-381089a0404eecbb693f5c7cb1000ecf3f58f4cc.tar.gz libquotient-381089a0404eecbb693f5c7cb1000ecf3f58f4cc.zip |
BaseJob: fix error handling for M_CONSENT_NOT_GIVEN
-rw-r--r-- | lib/jobs/basejob.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index 6ed9862f..6984f16f 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -315,13 +315,10 @@ void BaseJob::gotReply() } if (json.value("errcode").toString() == "M_CONSENT_NOT_GIVEN") { - auto urlString = json.value("consent_uri").toString(); - setStatus(UserConsentRequiredError, - tr("You must agree with the server's privacy policy; " - "please visit %1").arg(urlString)); - d->errorUrl = urlString; + d->status.code = UserConsentRequiredError; + d->errorUrl = json.value("consent_uri").toString(); } - if (!json.isEmpty()) // FIXME: The below is not localisable + else if (!json.isEmpty()) // FIXME: The below is not localisable setStatus(IncorrectRequestError, json.value("error").toString()); } } @@ -538,7 +535,7 @@ QString BaseJob::errorCaption() const case ContentAccessError: return tr("Access error"); case NotFoundError: - return tr("Requested data not found"); + return tr("Not found"); case IncorrectRequestError: return tr("Invalid request"); case IncorrectResponseError: |