A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
22.18k
stars
7.96k
forks
source link
gateway 进行Dubbo 调用,设置了Route 降级,降级后返回httpstatus 为 200 ,内容为空,而不是设置的返回状态,调整多个设置都无用 #2335
Open
boengood opened 2 years ago
Issue Description
通过 Route ID 设置了 降级后,在gatewayFilter 通过dubbo调用 鉴权服务,鉴权服务返回错误后,首次通过接口调用返回状态 500 是正常,但降级后,返回状态是 200 ,字符为空,
错误信息,但拦截错误,设置了返回状态也无用: com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowException: $D Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s): | checkpoint ⇢ springfox.boot.starter.autoconfigure.SwaggerUiWebFluxConfiguration$CustomWebFilter [DefaultWebFilterChain] | checkpoint ⇢ org.springframework.web.cors.reactive.CorsWebFilter [DefaultWebFilterChain] | checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain] | checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ HTTP GET "/demo/dubbo/echo" [ExceptionHandlingWebHandler] Stack trace:
Tell us your environment
Anything else we need to know?
如何设置,才能返回我设置的状态 和 内容?或者还有其他解决方案吗?