Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
fix(errors): handle aggregate errors better
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 1, 2018
1 parent c5d9dc7 commit 6239499
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@ class Installer {
`total run time: ${this.runTime / 1000}s`
)
})
.catch(err => { this.timedStage('teardown'); throw err })
.catch(err => {
this.timedStage('teardown')
if (err.message.match(/aggregate error/)) {
throw err[0]
} else {
throw err
}
})
.then(() => this)
}

Expand Down

0 comments on commit 6239499

Please sign in to comment.