aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-16 16:21:53 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-24 10:40:42 +0900
commit8a3bb2d5b27824890482fa7185bbc1fcda9dd49c (patch)
tree276e5bec059a9270935045c70b44df69f47a2582 /lib/jobs
parenta6df4183d6da324f2c2329f21d732071b3337cb8 (diff)
downloadlibquotient-8a3bb2d5b27824890482fa7185bbc1fcda9dd49c.tar.gz
libquotient-8a3bb2d5b27824890482fa7185bbc1fcda9dd49c.zip
BaseJob: preserve the calculated error code if JSON error code is unknown
Resetting the code to IncorrectRequestError has been a part of the cause for the incorrect Quaternion behaviour on expired tokens.
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index a79d0e03..0d9b9f10 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -334,8 +334,7 @@ void BaseJob::gotReply()
tr("Requested room version: %1")
.arg(json.value("room_version").toString());
} else if (!json.isEmpty()) // Not localisable on the client side
- setStatus(IncorrectRequestError,
- json.value("error"_ls).toString());
+ setStatus(d->status.code, json.value("error"_ls).toString());
}
}