fix circuitbreaker http code greater than 400 as fail response bug

pull/118/head
lepdou 2 years ago
parent 435b46382d
commit 0a57a60f5f

@ -5,3 +5,4 @@
- [feat:add custom label resolver spi for rate limit](https://github.com/Tencent/spring-cloud-tencent/pull/107)
- [feat:fix discovery weight param not set to register request bug](https://github.com/Tencent/spring-cloud-tencent/pull/104)
- [Bugfix: fix causing cpu 100% when set ScheduledThreadPoolExecutor corePoolSize=0](https://github.com/Tencent/spring-cloud-tencent/pull/101)
- [Bugfix: fix circuitbreaker http code greater than 400 as fail response bug](https://github.com/Tencent/spring-cloud-tencent/pull/118)

@ -56,8 +56,8 @@ public class PolarisFeignClient implements Client {
final ServiceCallResult resultRequest = createServiceCallResult(request);
try {
Response response = delegate.execute(request, options);
// HTTP code greater than 400 is an exception
if (response.status() >= 400) {
// HTTP code greater than 500 is an exception
if (response.status() >= 500) {
resultRequest.setRetStatus(RetStatus.RetFail);
}
return response;

Loading…
Cancel
Save