File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -475,12 +475,14 @@ async function requestLocalApi(
475475 methods : [ reqMethod ] ,
476476 calculateDelay : obj => {
477477 if ( obj . error . response !== undefined ) {
478- getLogger ( ) . debug ( 'Local API response: %s : %O' , uri , JSON . stringify ( obj . error . response ) )
478+ getLogger ( ) . debug ( 'Local API response: %s : %O' , uri , obj . error . response . statusMessage )
479479 }
480- if ( obj . error . code === 'ETIMEDOUT' ) {
480+ if ( obj . error . code === 'ETIMEDOUT' || obj . error . code === 'ECONNREFUSED' ) {
481481 return 0
482482 }
483- getLogger ( ) . debug ( `Local API: retry (${ obj . attemptCount } of ${ RETRY_LIMIT } ): ${ uri } : ${ obj . error } ` )
483+ getLogger ( ) . debug (
484+ `Local API: retry (${ obj . attemptCount } of ${ RETRY_LIMIT } ): ${ uri } : ${ obj . error . message } `
485+ )
484486 return RETRY_DELAY
485487 } ,
486488 } ,
@@ -496,7 +498,7 @@ async function requestLocalApi(
496498 getLogger ( ) . info ( 'Local API is alive: %s' , uri )
497499 return
498500 }
499- const msg = `Local API failed to respond (${ err . code } ) after ${ RETRY_LIMIT } retries, path: ${ api ?. path } , error: ${ err } `
501+ const msg = `Local API failed to respond (${ err . code } ) after ${ RETRY_LIMIT } retries, path: ${ api ?. path } , error: ${ err . message } `
500502 getLogger ( 'channel' ) . error ( msg )
501503 throw new Error ( msg )
502504 } )
You can’t perform that action at this time.
0 commit comments