aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rw-r--r--jobs/basejob.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index 5f5aa410..c3b110f0 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -267,6 +267,12 @@ void BaseJob::gotReply()
setStatus(checkReply(d->reply.data()));
if (status().good())
setStatus(parseReply(d->reply.data()));
+ else
+ {
+ auto json = QJsonDocument::fromJson(d->reply->readAll()).object();
+ if (!json.isEmpty())
+ setStatus(IncorrectRequestError, json.value("error").toString());
+ }
finishJob();
}