File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
browserstack-report-action Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -38283,18 +38283,19 @@ class ReportService {
3828338283 },
3828438284 });
3828538285 if (response.status < 200 || response.status > 299) {
38286+ core.info(`Error fetching report: ${response.status}`);
3828638287 return ReportService.errorResponse(response?.data?.errorMessage || "Something Went Wrong while Fetching report");
3828738288 }
3828838289 return response.data;
3828938290 } catch (error) {
3829038291 core.info(`Error fetching report: ${error.message}`);
38291- return ReportService.errorResponse(error.message );
38292+ return ReportService.errorResponse("Something Went Wrong while Fetching report" );
3829238293 }
3829338294 }
3829438295
3829538296 static errorResponse(errorMessage) {
3829638297 return {
38297- report: { basicHtml: `<pre>${errorMessage || "Something Went Wrong while Fetching report" }</pre>` },
38298+ report: { basicHtml: `<pre>${errorMessage}</pre>` },
3829838299 reportStatus: 'ERROR',
3829938300 };
3830038301 }
Original file line number Diff line number Diff line change @@ -16,18 +16,19 @@ class ReportService {
1616 } ,
1717 } ) ;
1818 if ( response . status < 200 || response . status > 299 ) {
19+ core . info ( `Error fetching report: ${ response . status } ` ) ;
1920 return ReportService . errorResponse ( response ?. data ?. errorMessage || "Something Went Wrong while Fetching report" ) ;
2021 }
2122 return response . data ;
2223 } catch ( error ) {
2324 core . info ( `Error fetching report: ${ error . message } ` ) ;
24- return ReportService . errorResponse ( error . message ) ;
25+ return ReportService . errorResponse ( "Something Went Wrong while Fetching report" ) ;
2526 }
2627 }
2728
2829 static errorResponse ( errorMessage ) {
2930 return {
30- report : { basicHtml : `<pre>${ errorMessage || "Something Went Wrong while Fetching report" } </pre>` } ,
31+ report : { basicHtml : `<pre>${ errorMessage } </pre>` } ,
3132 reportStatus : 'ERROR' ,
3233 } ;
3334 }
You can’t perform that action at this time.
0 commit comments