Use BoxError instead of Error in all places

This moves everything other than the addon code and some 'done' logic
This commit is contained in:
Girish Ramakrishnan
2019-12-04 10:29:06 -08:00
parent 3623831390
commit 30eccfb54b
17 changed files with 45 additions and 36 deletions

View File

@@ -282,7 +282,7 @@ function copy(apiConfig, oldFilePath, newFilePath) {
events.emit('progress', `Uploaded part ${partCopyParams.PartNumber} - Etag: ${result.CopyPartResult.ETag}`);
if (!result.CopyPartResult.ETag) return done(new Error('Multi-part copy is broken or not implemented by the S3 storage provider'));
if (!result.CopyPartResult.ETag) return done(new BoxError(BoxError.EXTERNAL_ERROR, 'Multi-part copy is broken or not implemented by the S3 storage provider'));
uploadedParts.push({ ETag: result.CopyPartResult.ETag, PartNumber: partNumber });