aboutsummaryrefslogtreecommitdiff
path: root/jobs/basejob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/basejob.cpp')
-rw-r--r--jobs/basejob.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index 0e3e59d0..486956e1 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -266,6 +266,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();
}
@@ -447,6 +453,7 @@ void BaseJob::setStatus(int code, QString message)
void BaseJob::abandon()
{
beforeAbandon(d->reply.data());
+ setStatus(Abandoned);
this->disconnect();
if (d->reply)
d->reply->disconnect(this);