diff --git a/src/authentication/authentication.guard.ts b/src/authentication/authentication.guard.ts index bf4fbf2..f4d3454 100644 --- a/src/authentication/authentication.guard.ts +++ b/src/authentication/authentication.guard.ts @@ -123,7 +123,11 @@ export class AuthenticationGuard jwt.verify(accessToken, pemValue); accessTokenPayload = accessTokenDecoded.payload; } catch (err) { - this.logger.log('Unable to verify duc access token\n' + err.stack); + // only log if it's not a health check request + if (`${request.method} ${request.route.path}` !== 'GET /health') { + this.logger.log('Unable to verify duc access token\n' + err.stack); + } + return false; }