Right now the only way you could handle response status >=300 is either via using Response class as a return type, or via throwing a custom exception from errorDecoder (https://github.com/Netflix/feign/blob/6a6271727ad14dd776e3c3fb029f15fdf95c9c4a/core/src/main/java/feign/SynchronousMethodHandler.java#L112-L135).
This prevents handling failed responses via spring ResponseEntity and generally prevents handling failures gracefully with errorDecoder.
If we would change throw to return in https://github.com/Netflix/feign/blob/6a6271727ad14dd776e3c3fb029f15fdf95c9c4a/core/src/main/java/feign/SynchronousMethodHandler.java#L134, we could both return custom error object if needed, and throw an exception if desired.
Right now the only way you could handle response status
>=300is either via usingResponseclass as a return type, or via throwing a custom exception fromerrorDecoder(https://github.com/Netflix/feign/blob/6a6271727ad14dd776e3c3fb029f15fdf95c9c4a/core/src/main/java/feign/SynchronousMethodHandler.java#L112-L135).This prevents handling failed responses via spring
ResponseEntityand generally prevents handling failures gracefully witherrorDecoder.If we would change
throwtoreturnin https://github.com/Netflix/feign/blob/6a6271727ad14dd776e3c3fb029f15fdf95c9c4a/core/src/main/java/feign/SynchronousMethodHandler.java#L134, we could both return custom error object if needed, and throw an exception if desired.