log unauthorized error

This commit is contained in:
Hongbo Wu
2023-06-28 12:22:32 +08:00
parent 1b069c2696
commit b60ace4877

View File

@ -26,6 +26,7 @@ export function userRouter() {
try {
claims = await getClaimsByToken(token)
if (!claims) {
logger.info('failed to authorize')
return res.status(401).send('UNAUTHORIZED')
}
} catch (e) {