diff --git a/lib/common/typeorm.utils.ts b/lib/common/typeorm.utils.ts index 4440e7b88..a4bf03e1a 100644 --- a/lib/common/typeorm.utils.ts +++ b/lib/common/typeorm.utils.ts @@ -115,7 +115,7 @@ export function handleRetry( ): (source: Observable) => Observable { return (source: Observable) => source.pipe( - retryWhen((e) => + retryWhen(e => e.pipe( scan((errorCount, error: Error) => { const connectionInfo = @@ -125,10 +125,10 @@ export function handleRetry( const verboseMessage = verboseRetryLog ? ` Message: ${error.message}.` : ''; + logger.error( - `Unable to connect to the database${connectionInfo}.${verboseMessage} Retrying (${ - errorCount + 1 - })...`, + `Unable to connect to the database${connectionInfo}.${verboseMessage} Retrying (${errorCount + + 1})...`, error.stack, ); if (errorCount + 1 >= retryAttempts) {