efficiency and exception change
This commit is contained in:
parent
4048c21c1f
commit
88212ff79b
32 changed files with 121 additions and 124 deletions
|
@ -19,9 +19,9 @@ export default async function authenticate(req: Request, res: Response, next: Fu
|
|||
})
|
||||
.catch((err) => {
|
||||
if (err == "jwt expired") {
|
||||
throw new UnauthorizedRequestException("Token expired");
|
||||
throw new UnauthorizedRequestException("Token expired", err);
|
||||
} else {
|
||||
throw new BadRequestException("Failed Authorization Header decoding");
|
||||
throw new BadRequestException("Failed Authorization Header decoding", err);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue