Add logs while verifying token
All checks were successful
Test - Build & Deploy to Scaleway / build-and-push-images-lecoffre (push) Successful in 1m48s
Test - Build & Deploy to Scaleway / deploy-back-lecoffre (push) Successful in 4s
Test - Build & Deploy to Scaleway / deploy-cron-lecoffre (push) Successful in 3s

This commit is contained in:
omaroughriss 2025-07-31 11:27:13 +02:00
parent c33d4faacd
commit 3e5d17157b

View File

@ -16,7 +16,7 @@ export default function authHandler(req: Request, response: Response, next: Next
const authService = Container.get(AuthService);
authService.verifyAccessToken(token, (err, userPayload) => {
if (err) {
response.status(HttpCodes.UNAUTHORIZED).send("Error while verifying token");
response.status(HttpCodes.UNAUTHORIZED).send("Error while verifying token:" + JSON.stringify(err) + " token:" + JSON.stringify(token));
return;
}
req.body.user = userPayload;