feat(微服务治理工具): 网关异常时记录错误日志

Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
OTTO 2025-03-06 16:41:35 +08:00
parent b5d2376beb
commit d8645f34e4
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
try {
claims = JwtUtils.parseToken(token);
} catch (Exception e) {
log.error("令牌解析失败:{}", e.getMessage());
return unauthorizedResponse(exchange, "令牌格式不正确!");
}
if (claims == null) {