From 5b8f534df7a1f77cb5c2bf21ad683a13b8856958 Mon Sep 17 00:00:00 2001 From: Surya Tripathi Date: Mon, 7 Dec 2020 18:09:56 +0530 Subject: [PATCH] return in case of error, improved error messaging --- bin/helpers/reporterHTML.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/helpers/reporterHTML.js b/bin/helpers/reporterHTML.js index 322be0f8..9e6dc3b0 100644 --- a/bin/helpers/reporterHTML.js +++ b/bin/helpers/reporterHTML.js @@ -107,11 +107,15 @@ let reportGenerator = (bsConfig, buildId, args, cb) => { let build; if (err) { - message = Constants.userMessages.BUILD_INFO_FAILED; + message = err; messageType = Constants.messageTypes.ERROR; - errorCode = 'api_failed_build_info'; + errorCode = 'api_failed_build_report'; - logger.info(message); + logger.error('Generating the build report failed.'); + logger.error(message); + + utils.sendUsageReport(bsConfig, args, message, messageType, errorCode); + return; } else { try { build = JSON.parse(body);