improvement: moved all console logs to pino

This commit is contained in:
canove
2021-01-07 20:52:51 -03:00
parent 0689b55453
commit 896f122cf7
16 changed files with 57 additions and 36 deletions

View File

@@ -30,7 +30,10 @@ const isAuth = (req: Request, res: Response, next: NextFunction): void => {
profile
};
} catch (err) {
throw new AppError("Invalid token.", 403);
throw new AppError(
"Invalid token. We'll try to assign a new one on next request",
403
);
}
return next();