Add debug

This commit is contained in:
Girish Ramakrishnan
2017-11-28 10:28:17 -08:00
parent 126d8b9bec
commit 76312495fd
2 changed files with 14 additions and 6 deletions

View File

@@ -179,7 +179,7 @@ function download(apiConfig, backupFilePath, callback) {
if (error.code === 'NoSuchKey' || error.code === 'ENOENT') {
ps.emit('error', new BackupsError(BackupsError.NOT_FOUND));
} else {
debug('[%s] download: s3 stream error.', backupFilePath, error);
debug(`download: ${apiConfig.bucket}:${backupFilePath} s3 stream error.`, error);
ps.emit('error', new BackupsError(BackupsError.EXTERNAL_ERROR, error.message || error.code)); // DO sets 'code'
}
});