I've a public route, that need to validate jwt token and return boolean based on the token result, the problem is I can not catch jwtService.verify(token):
Here is my code:
async verifyToken(token: string) {
try {
const verified = this.jwtService.verifyAsync(token);
} catch (error: any) {
console.log(error);
}
}