Skip to content

Commit

Permalink
fix(lockfile): throw error if result from lockfile server has a message
Browse files Browse the repository at this point in the history
and therefore is an error
  • Loading branch information
Realtin committed Jul 1, 2019
1 parent 1829317 commit 8f1b14d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lockfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ async function getNewLockfile ({ packageJson, lock, type, repositoryTokens }) {
})
.then(result => {
jobCountByServer[nextServer]--
if (result instanceof Error) {
// it is an error!
if ((result instanceof Error) || result.message) {
// result is either `error`, `{ok: false}`, `{ok: false, error}` or `{ok: true, contents}`
const error = result
throw error
} else {
Expand Down

0 comments on commit 8f1b14d

Please sign in to comment.