Skip to content

Commit 2e96947

Browse files
better error handling
1 parent 0546545 commit 2e96947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wtp/apiCaller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ const runWtpTest = async (url, mobile, cb) => {
8484
let rollBarMsg = {testId: "", analyzedUrl: url, thirdPartyErrorCode: "", thirdPartyErrorMsg: "", file: path.basename((__filename))};
8585
try {
8686
response = await got(options);
87-
logger.info("Started WPT test");
8887
const {statusCode, body} = response;
8988
if (statusCode !== 200) {
9089
rollBarMsg.thirdPartyErrorCode = response.statusCode;
@@ -100,6 +99,7 @@ const runWtpTest = async (url, mobile, cb) => {
10099
rollBarMsg.testId = (typeof bodyJson.data !== 'undefined' && typeof bodyJson.data.testId !== 'undefined') ?
101100
(bodyJson.data.testId) :
102101
"N/A";
102+
logger.info("Started WPT test", {"testId": rollBarMsg.testId});
103103
let testId = resultParser.parseTestResponse(bodyJson, rollBarMsg);
104104
if (typeof testId === 'object') {
105105
cb(null, testId);

0 commit comments

Comments
 (0)