Skip to content

Commit

Permalink
fix: stack on user facing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Jul 29, 2016
1 parent 20dc3c0 commit 6d2fef4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ module.exports.message = function (error) {
if (message) {
message = message.replace(/(%s)/g, error.message).trim();
message = chalk.bold.red(message);
} else {
} else if (error.code) { // means it's a code error
message = 'An unknown error occurred. Please include the trace below ' +
'when reporting to Snyk:\n\n' + error.stack;
} else { // should be one of ours
message = error.message;
}
}

Expand Down

0 comments on commit 6d2fef4

Please sign in to comment.