aboutsummaryrefslogtreecommitdiff
path: root/lib
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-16 16:21:53 +0900
commit4c9ed0c64ec45c084af657e1fa188242a1d26d1a (patch)
tree5fb70bb286839d0aecf8f6a24a5b5a2b462185bd /lib
parent533f837086d3522c54f0622d3f27e0a5d1347b24 (diff)
downloadlibquotient-4c9ed0c64ec45c084af657e1fa188242a1d26d1a.tar.gz
libquotient-4c9ed0c64ec45c084af657e1fa188242a1d26d1a.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')
-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());
}
}