aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rw-r--r--jobs/basejob.cpp10
-rw-r--r--jobs/basejob.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index a50e9f84..5c1be0f0 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -65,7 +65,7 @@ class BaseJob::Private
QTimer timer;
};
-inline QDebug operator<<(QDebug dbg, BaseJob* j)
+inline QDebug operator<<(QDebug dbg, const BaseJob* j)
{
return dbg << "Job" << j->objectName();
}
@@ -160,6 +160,8 @@ void BaseJob::gotReply()
BaseJob::Status BaseJob::checkReply(QNetworkReply* reply) const
{
+ if (reply->error() != QNetworkReply::NoError)
+ qDebug() << this << "returned" << reply->error();
switch( reply->error() )
{
case QNetworkReply::NoError:
@@ -170,6 +172,12 @@ BaseJob::Status BaseJob::checkReply(QNetworkReply* reply) const
case QNetworkReply::ContentOperationNotPermittedError:
return { ContentAccessError, reply->errorString() };
+ case QNetworkReply::ProtocolInvalidOperationError:
+ return { IncorrectRequestError, reply->errorString() };
+
+ case QNetworkReply::ContentNotFoundError:
+ return { NotFoundError, reply->errorString() };
+
default:
return { NetworkError, reply->errorString() };
}
diff --git a/jobs/basejob.h b/jobs/basejob.h
index ba6c4a62..e54580bd 100644
--- a/jobs/basejob.h
+++ b/jobs/basejob.h
@@ -46,6 +46,8 @@ namespace QMatrixClient
, JsonParseError
, TimeoutError
, ContentAccessError
+ , NotFoundError
+ , IncorrectRequestError
, UserDefinedError = 200
};