FIX: suppressing health check not authenticated log

This commit is contained in:
Arthur Simas
2022-06-23 23:38:24 -03:00
parent 8ce7a692b6
commit 55fb1a8b34
+5 -1
View File
@@ -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;
}