diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ea04205..3467563b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,4 +6,5 @@ - [feat:fix discovery weight param not set to register request bug](https://github.com/Tencent/spring-cloud-tencent/pull/102) - [Bugfix: fix causing cpu 100% when set ScheduledThreadPoolExecutor corePoolSize=0](https://github.com/Tencent/spring-cloud-tencent/pull/98) - [Refactor: refactor transfer metadata](https://github.com/Tencent/spring-cloud-tencent/pull/113) +- [Bugfix: fix circuitbreaker http code greater than 400 as fail response bug](https://github.com/Tencent/spring-cloud-tencent/pull/118) - [Feat: optimize router dependency](https://github.com/Tencent/spring-cloud-tencent/pull/115) diff --git a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/PolarisFeignClient.java b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/PolarisFeignClient.java index ed0cb317..f5a26b9c 100644 --- a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/PolarisFeignClient.java +++ b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/PolarisFeignClient.java @@ -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;