Skip to content

Commit

Permalink
Merge pull request #97 from browserstack/custom-report-network
Browse files Browse the repository at this point in the history
return in case of error, improved error messaging
  • Loading branch information
suryart authored Dec 8, 2020
2 parents 205a737 + 5b8f534 commit 962f7ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/helpers/reporterHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 962f7ff

Please sign in to comment.