@@ -98,11 +98,7 @@ export class ContainerMapping implements IMicrosoftSecurityDevOps {
9898 }
9999
100100 // Don't run the container mapping workload if this caller isn't an active customer.
101- var callerIsOnboarded : boolean | void = await this . checkCallerIsCustomer ( bearerToken , sendReportRetryCount )
102- . catch ( ( error ) => {
103- core . info ( `CAUGHT: ${ error } ` ) ;
104- return ;
105- } ) ;
101+ var callerIsOnboarded : boolean = await this . checkCallerIsCustomer ( bearerToken , sendReportRetryCount ) ;
106102 if ( ! callerIsOnboarded ) {
107103 core . info ( "Client is not onboarded to Defender for DevOps. Skipping container mapping workload." )
108104 return ;
@@ -238,7 +234,7 @@ export class ContainerMapping implements IMicrosoftSecurityDevOps {
238234 } else if ( statusCode == 403 ) { // Status 'Forbidden' means caller is not a customer.
239235 return false ;
240236 } else {
241- core . info ( `Unexpected status code: ${ statusCode } ` ) ; // TODO: core.debug
237+ core . debug ( `Unexpected status code: ${ statusCode } ` ) ;
242238 if ( retryCount == 0 ) {
243239 return false ;
244240 } else {
@@ -277,16 +273,14 @@ export class ContainerMapping implements IMicrosoftSecurityDevOps {
277273
278274 res . on ( 'end' , ( ) => {
279275 core . debug ( 'API calls finished. Time taken: ' + ( new Date ( ) . getMilliseconds ( ) - apiTime ) + "ms" ) ;
280- core . info ( `Status code: ${ res . statusCode } ${ res . statusMessage } ` ) ; // TODO
276+ core . info ( `Status code: ${ res . statusCode } ${ res . statusMessage } ` ) ;
281277 resolve ( res . statusCode ) ;
282278 } ) ;
283- // res.on('data', function(d) {
284- // core.info(`data: ${d}`);
285- // });
279+ res . on ( 'data' , function ( d ) {
280+ } ) ;
286281 } ) ;
287282
288283 req . on ( 'error' , ( error ) => {
289- core . info ( `Error in _checkCallerIsCustomer: ${ error . name } , ${ error . message } ` ) ; // TODO
290284 reject ( new Error ( `Error calling url: ${ error } ` ) ) ;
291285 } ) ;
292286
0 commit comments