Merge pull request #116 from lepdou/h/fix_circuitbreak_400_bug

fix circuitbreaker http code greater than 400 as fail response bug
pull/123/head
Haotian Zhang 3 years ago committed by GitHub
commit 9a626dccc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,5 +6,6 @@
- [feat:add custom label resolver spi for rate limit](https://github.com/Tencent/spring-cloud-tencent/pull/105)
- [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)
- [Bugfix: fix circuitbreaker http code greater than 400 as fail response bug](https://github.com/Tencent/spring-cloud-tencent/pull/116)
- [Feat: optimize router dependency](https://github.com/Tencent/spring-cloud-tencent/pull/110)
- [Refactor: refactor transfer metadata](https://github.com/Tencent/spring-cloud-tencent/pull/111)

@ -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