@@ -162,7 +162,7 @@ export class TaskHubGrpcWorker {
162162 this . internalRunWorker ( client ) . catch ( ( err ) => {
163163 // Only log if the worker wasn't stopped intentionally
164164 if ( ! this . _stopWorker ) {
165- this . _logger . error ( ` Worker error: ${ err } ` ) ;
165+ this . _logger . error ( " Worker error:" , err ) ;
166166 }
167167 } ) ;
168168
@@ -228,7 +228,7 @@ export class TaskHubGrpcWorker {
228228 // do not await
229229 this . internalRunWorker ( newClient , true ) . catch ( ( err ) => {
230230 if ( ! this . _stopWorker ) {
231- this . _logger . error ( ` Worker error: ${ err } ` ) ;
231+ this . _logger . error ( " Worker error:" , err ) ;
232232 }
233233 } ) ;
234234 } ) ;
@@ -261,7 +261,7 @@ export class TaskHubGrpcWorker {
261261 this . _stub = newClient . stub ;
262262 this . internalRunWorker ( newClient , true ) . catch ( ( retryErr ) => {
263263 if ( ! this . _stopWorker ) {
264- this . _logger . error ( ` Worker error: ${ retryErr } ` ) ;
264+ this . _logger . error ( " Worker error:" , retryErr ) ;
265265 }
266266 } ) ;
267267 return ;
@@ -370,8 +370,10 @@ export class TaskHubGrpcWorker {
370370 res . setCompletiontoken ( completionToken ) ;
371371 res . setActionsList ( actions ) ;
372372 } catch ( e : any ) {
373- this . _logger . error ( e ) ;
374- this . _logger . info ( `An error occurred while trying to execute instance '${ req . getInstanceid ( ) } ': ${ e . message } ` ) ;
373+ this . _logger . error (
374+ `An error occurred while trying to execute instance '${ req . getInstanceid ( ) } ':` ,
375+ e ,
376+ ) ;
375377
376378 const failureDetails = pbh . newFailureDetails ( e ) ;
377379
@@ -445,8 +447,7 @@ export class TaskHubGrpcWorker {
445447 res . setCompletiontoken ( completionToken ) ;
446448 res . setResult ( s ) ;
447449 } catch ( e : any ) {
448- this . _logger . error ( e ) ;
449- this . _logger . info ( `An error occurred while trying to execute activity '${ req . getName ( ) } ': ${ e . message } ` ) ;
450+ this . _logger . error ( `An error occurred while trying to execute activity '${ req . getName ( ) } ':` , e ) ;
450451
451452 const failureDetails = pbh . newFailureDetails ( e ) ;
452453
0 commit comments