mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-04-09 19:15:43 +02:00
use the error message sent by the server for bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
34c4c28879
commit
1a9aade28e
src/libsync
@ -320,7 +320,7 @@ void BulkPropagatorJob::slotPutFinishedOneFile(const BulkUploadItem &singleFile,
|
||||
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;
|
||||
}
|
||||
|
||||
@ -583,12 +583,13 @@ void BulkPropagatorJob::checkResettingErrors(SyncFileItemPtr item) const
|
||||
}
|
||||
}
|
||||
|
||||
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,
|
||||
|
@ -127,7 +127,8 @@ private:
|
||||
/**
|
||||
* 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,
|
||||
|
Loading…
Reference in New Issue
Block a user