Skip to content

Commit 988c968

Browse files
committed
errorResponse update
1 parent 6dda639 commit 988c968

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

browserstack-report-action/dist/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38166,15 +38166,9 @@ async function run() {
3816638166
} = actionInput.getInputs();
3816738167
const authHeader = `Basic ${Buffer.from(`${username}:${accessKey}`).toString('base64')}`;
3816838168

38169-
// Enable test mode if environment variable is set
38170-
const isTestMode = 'true';
38171-
if (isTestMode) {
38172-
core.info('Running in test mode with mock API responses');
38173-
}
38174-
3817538169
const timeManager = new TimeManager(userTimeout
3817638170
|| constants.DEFAULT_USER_TIMEOUT_SECONDS);
38177-
const reportService = new ReportService(authHeader, isTestMode);
38171+
const reportService = new ReportService(authHeader);
3817838172

3817938173
const initialParams = {
3818038174
originalBuildName: buildName,
@@ -38294,7 +38288,7 @@ class ReportService {
3829438288
return response.data;
3829538289
} catch (error) {
3829638290
core.info(`Error fetching report: ${error.message}`);
38297-
return this.errorResponse();
38291+
return this.errorResponse(error.message);
3829838292
}
3829938293
}
3830038294

browserstack-report-action/src/main.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@ async function run() {
1515
} = actionInput.getInputs();
1616
const authHeader = `Basic ${Buffer.from(`${username}:${accessKey}`).toString('base64')}`;
1717

18-
// Enable test mode if environment variable is set
19-
const isTestMode = 'true';
20-
if (isTestMode) {
21-
core.info('Running in test mode with mock API responses');
22-
}
23-
2418
const timeManager = new TimeManager(userTimeout
2519
|| constants.DEFAULT_USER_TIMEOUT_SECONDS);
26-
const reportService = new ReportService(authHeader, isTestMode);
20+
const reportService = new ReportService(authHeader);
2721

2822
const initialParams = {
2923
originalBuildName: buildName,

browserstack-report-action/src/services/ReportService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ReportService {
2121
return response.data;
2222
} catch (error) {
2323
core.info(`Error fetching report: ${error.message}`);
24-
return this.errorResponse();
24+
return this.errorResponse(error.message);
2525
}
2626
}
2727

0 commit comments

Comments
 (0)