mirror of
https://github.com/umami-software/umami.git
synced 2026-02-21 04:55:36 +01:00
exception handling
This commit is contained in:
parent
9893b7850a
commit
77fd98387c
1 changed files with 6 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ import {
|
|||
import { NextApiRequestCollect } from 'pages/api/send';
|
||||
import { getUserById } from '../queries';
|
||||
import { verifier } from './jwtVerifier';
|
||||
import { JwtExpiredError,JwtInvalidIssuerError } from "aws-jwt-verify/error";
|
||||
import { JwtExpiredError,JwtInvalidIssuerError,JwtParseError } from "aws-jwt-verify/error";
|
||||
|
||||
|
||||
const log = debug('umami:middleware');
|
||||
|
|
@ -69,7 +69,11 @@ export const useAuth = createMiddleware(async (req, res, next) => {
|
|||
console.error("JWT invalid issuer!",error.message);
|
||||
}
|
||||
|
||||
console.log('INVALID TOKEN:::::',error)
|
||||
if (error instanceof JwtParseError) {
|
||||
console.error("JWT Parse Issue",error.message);
|
||||
}
|
||||
|
||||
console.log('INVALID TOKEN:::::',error); //unknow handle
|
||||
}
|
||||
}
|
||||
let user = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue