Skip to content

Commit

Permalink
fix(MongoBinaryDownload::extractTarGz): wrap error messages in "Gener…
Browse files Browse the repository at this point in the history
…icMMSError"
  • Loading branch information
hasezoey committed Aug 17, 2022
1 parent bcb4dab commit a8733dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,15 @@ export class MongoBinaryDownload {
return new Promise((res, rej) => {
createReadStream(mongoDBArchive)
.on('error', (err) => {
rej('Unable to open tarball ' + mongoDBArchive + ': ' + err);
rej(new GenericMMSError('Unable to open tarball ' + mongoDBArchive + ': ' + err));
})
.pipe(createUnzip())
.on('error', (err) => {
rej('Error during unzip for ' + mongoDBArchive + ': ' + err);
rej(new GenericMMSError('Error during unzip for ' + mongoDBArchive + ': ' + err));
})
.pipe(extract)
.on('error', (err) => {
rej('Error during untar for ' + mongoDBArchive + ': ' + err);
rej(new GenericMMSError('Error during untar for ' + mongoDBArchive + ': ' + err));
})
.on('finish', res);
});
Expand Down

0 comments on commit a8733dc

Please sign in to comment.