Use BoxError in on error cases

This commit is contained in:
Girish Ramakrishnan
2019-12-05 09:54:29 -08:00
parent 4bb676fb5c
commit c07e215148
5 changed files with 15 additions and 10 deletions

View File

@@ -1996,7 +1996,7 @@ function uploadFile(appId, sourceFilePath, destFilePath, callback) {
const done = once(function (error) {
safe.fs.unlinkSync(sourceFilePath); // remove file in /tmp
callback(error);
callback(new BoxError(BoxError.FS_ERROR, error.message)); // blame it on filesystem for now
});
// the built-in bash printf understands "%q" but not /usr/bin/printf.