singleFile._item->_responseTimeStamp = job->responseTimestamp();
singleFile._item->_requestId = job->requestId();
if (singleFile._item->_httpErrorCode != 200) {
- commonErrorHandling(singleFile._item);
+ commonErrorHandling(singleFile._item, fileReply[QStringLiteral("message")].toString());
return;
}
}
}
-void BulkPropagatorJob::commonErrorHandling(SyncFileItemPtr item)
+void BulkPropagatorJob::commonErrorHandling(SyncFileItemPtr item,
+ const QString &errorMessage)
{
// Ensure errors that should eventually reset the chunked upload are tracked.
checkResettingErrors(item);
- abortWithError(item, SyncFileItem::NormalError, tr("Error"));
+ abortWithError(item, SyncFileItem::NormalError, errorMessage);
}
bool BulkPropagatorJob::checkFileStillExists(SyncFileItemPtr item,
/**
* Error handling functionality that is shared between jobs.
*/
- void commonErrorHandling(SyncFileItemPtr item);
+ void commonErrorHandling(SyncFileItemPtr item,
+ const QString &errorMessage);
bool checkFileStillExists(SyncFileItemPtr item,
const bool finished,