[Partial error handling changes] [Standardize IPC replies]

This commit is contained in:
Scott E. Graves
2018-10-02 18:43:02 -05:00
parent 51ca79fd4f
commit 7e82690f5e
5 changed files with 136 additions and 160 deletions

View File

@@ -80,18 +80,18 @@ module.exports.downloadFile = (url, destination, progressCallback, completeCallb
response.data.on('end', () => {
stream.end(() => {
completeCallback(true);
completeCallback();
});
});
response.data.on('error', (e) => {
stream.end(() => {
completeCallback(false, e);
completeCallback(e);
});
});
})
.catch((e)=> {
completeCallback(false, e);
completeCallback(e);
});
};