diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-10-05 03:44:18 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-10-05 03:44:18 +0200 |
commit | 9cfd6ad6a4651280a12099d1a92432f07fc5aae0 (patch) | |
tree | 5301b4392d26671908ffb9c597a8c2c00eeb1dcb /lib/jobs/basejob.h | |
parent | 67da887e864d292608e7132388f518596374af34 (diff) | |
download | libquotient-9cfd6ad6a4651280a12099d1a92432f07fc5aae0.tar.gz libquotient-9cfd6ad6a4651280a12099d1a92432f07fc5aae0.zip |
BaseJob: refresh error handling
- BaseJob::prepareError() slightly updated to get the current status
instead of checking the returned value outside in gotReply()
- BaseJob::gotReply() no more reports on 429 Too Many Requests twice
(the first time with dubious "Too Many Requests: Unknown error")
Diffstat (limited to 'lib/jobs/basejob.h')
-rw-r--r-- | lib/jobs/basejob.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h index e0910a26..119d7cce 100644 --- a/lib/jobs/basejob.h +++ b/lib/jobs/basejob.h @@ -399,10 +399,12 @@ protected: * was not good (usually because of an unsuccessful HTTP code). * The base implementation assumes Matrix JSON error object in the body; * overrides are strongly recommended to call it for all stock Matrix - * responses as early as possible but in addition can process custom errors, + * responses as early as possible and only then process custom errors, * with JSON or non-JSON payload. + * + * \return updated (if necessary) job status */ - virtual Status prepareError(); + virtual Status prepareError(Status currentStatus); /*! \brief Get direct access to the JSON response object in the job * |