Skip to content

Commit

Permalink
refactor(CLI): Improve modern error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 1, 2021
1 parent 2828a2c commit a205f88
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/cli/handle-error.js
Expand Up @@ -159,10 +159,7 @@ module.exports = async (exception, options = {}) => {
const errorMsg = stripAnsi(
exceptionTokens.stack && !isUserError ? exceptionTokens.stack : exceptionTokens.message
);
writeText(style.error('\nError:'));
if (errorMsg) {
writeText(` ${errorMsg.split('\n').join('\n ')}`);
}
writeText(null, style.error('Error:'), errorMsg);

legacy.consoleLog(chalk.yellow(' Get Support --------------------------------------------'));
legacy.consoleLog(`${chalk.yellow(' Docs: ')}docs.serverless.com`);
Expand Down

0 comments on commit a205f88

Please sign in to comment.