aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/basejob.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jobs/basejob.h')
-rw-r--r--lib/jobs/basejob.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h
index 4ee63adb..d435749a 100644
--- a/lib/jobs/basejob.h
+++ b/lib/jobs/basejob.h
@@ -310,7 +310,7 @@ namespace QMatrixClient
* Processes the reply. By default, parses the reply into
* a QJsonDocument and calls parseJson() if it's a valid JSON.
*
- * @param reply raw contents of a HTTP reply from the server (without headers)
+ * @param reply raw contents of a HTTP reply from the server
*
* @see gotReply, parseJson
*/
@@ -318,7 +318,7 @@ namespace QMatrixClient
/**
* Processes the JSON document received from the Matrix server.
- * By default returns succesful status without analysing the JSON.
+ * By default returns successful status without analysing the JSON.
*
* @param json valid JSON document received from the server
*
@@ -326,6 +326,15 @@ namespace QMatrixClient
*/
virtual Status parseJson(const QJsonDocument&);
+ /**
+ * Processes the reply in case of unsuccessful HTTP code.
+ * The body is already loaded from the reply object to errorJson.
+ * @param reply the HTTP reply from the server
+ * @param errorJson the JSON payload describing the error
+ */
+ virtual Status parseError(QNetworkReply* reply,
+ const QJsonObject& errorJson);
+
void setStatus(Status s);
void setStatus(int code, QString message);