@Override
    protected Response filter(Request request, RequestMeta meta, Class handlerClazz) {
        
        Method method;
        try {
            method = getHandleMethod(handlerClazz);
        } catch (NacosException e) {
            return null;
        }
        
        if (method.isAnnotationPresent(TpsControl.class) && TpsControlConfig.isTpsControlEnabled()) {
            
            try {
                TpsControl tpsControl = method.getAnnotation(TpsControl.class);
                String pointName = tpsControl.pointName();
                TpsCheckRequest tpsCheckRequest = null;
                String parseName = StringUtils.isBlank(tpsControl.name()) ? pointName : tpsControl.name();
                RemoteTpsCheckRequestParser parser = RemoteTpsCheckRequestParserRegistry.getParser(parseName);
                if (parser != null) {
                    tpsCheckRequest = parser.parse(request, meta);
                }
                if (tpsCheckRequest == null) {
                    tpsCheckRequest = new TpsCheckRequest();
                }
                if (StringUtils.isBlank(tpsCheckRequest.getPointName())) {
                    tpsCheckRequest.setPointName(pointName);
                }
                
                initTpsControlManager();
                
                TpsCheckResponse check = tpsControlManager.check(tpsCheckRequest);
                
                if (!check.isSuccess()) {
                    Response response;
                    try {
                        response = super.getDefaultResponseInstance(handlerClazz);
                        response.setErrorInfo(NacosException.OVER_THRESHOLD,
                                "Tps Flow restricted:" + check.getMessage());
                        return response;
                    } catch (Exception e) {
                        com.alibaba.nacos.plugin.control.Loggers.TPS.warn("Tps check fail , request: {},exception:{}",
                                request.getClass().getSimpleName(), e);
                        return null;
                    }
                    
                }
            } catch (Throwable throwable) {
                com.alibaba.nacos.plugin.control.Loggers.TPS.warn("Tps check exception , request: {},exception:{}",
                        request.getClass().getSimpleName(), throwable);
            }
        }
        
        return null;
    }
@Test
    void testTpsCheckException() {
        HealthCheckRequest healthCheckRequest = new HealthCheckRequest();
        RequestMeta requestMeta = new RequestMeta();
        Mockito.when(tpsControlManager.check(any(TpsCheckRequest.class))).thenThrow(new NacosRuntimeException(12345));
        Response filterResponse = tpsControlRequestFilter.filter(healthCheckRequest, requestMeta, HealthCheckRequestHandler.class);
        assertNull(filterResponse);
    }