Use whilst instead of forever
this gets rid of the Error object
This commit is contained in:
+4
-2
@@ -17,6 +17,7 @@ exports = module.exports = {
|
||||
};
|
||||
|
||||
var assert = require('assert'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
debug = require('debug')('box:storage/noop'),
|
||||
EventEmitter = require('events');
|
||||
|
||||
@@ -38,7 +39,7 @@ function download(apiConfig, backupFilePath, callback) {
|
||||
|
||||
debug('download: %s', backupFilePath);
|
||||
|
||||
callback(new Error('Cannot download from noop backend'));
|
||||
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'Cannot download from noop backend'));
|
||||
}
|
||||
|
||||
function listDir(apiConfig, dir, batchSize, iteratorCallback, callback) {
|
||||
@@ -60,7 +61,7 @@ function downloadDir(apiConfig, backupFilePath, destDir) {
|
||||
process.nextTick(function () {
|
||||
debug('downloadDir: %s -> %s', backupFilePath, destDir);
|
||||
|
||||
events.emit('done', new Error('Cannot download from noop backend'));
|
||||
events.emit('done', new BoxError(BoxError.NOT_IMPLEMENTED, 'Cannot download from noop backend'));
|
||||
});
|
||||
return events;
|
||||
}
|
||||
@@ -109,5 +110,6 @@ function removePrivateFields(apiConfig) {
|
||||
return apiConfig;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function injectPrivateFields(newConfig, currentConfig) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user