feat: 全局filter添加请求过于频繁的错误信息处理
This commit is contained in:
@@ -43,6 +43,10 @@ export class GlobalExceptionsFilter implements ExceptionFilter {
|
|||||||
path: '/',
|
path: '/',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (statusCode === HttpStatus.TOO_MANY_REQUESTS) {
|
||||||
|
errorResponse.message = '请求过于频繁,请稍后再试';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger.warn(exception, request.path);
|
Logger.warn(exception, request.path);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user