spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Fail on client Error

Open WeirdBob opened this issue 9 years ago • 1 comments

Hi,

As it is, the default behaviour is to fail on client error (ie if the underlying service response is 4xx, the gateway will return a 500 Http error).

I had to modify the org.springframework.cloud.gateway.filter.NettyRoutingFilter class and add failOnClientError(false) to the HttpClientRequest creation (l.79).

I think the failOnClentError(false) should be the default behaviour (transparent gateway), or at least configurable.

Thanks for this awesome project, I'm looking forward to using it ( if you have an ETA, I'd be very pleased ;) )

WeirdBob avatar Jun 02 '17 10:06 WeirdBob

It will be part of the Finchley release train https://github.com/spring-cloud/spring-cloud-release/milestones?direction=asc&sort=due_date&state=open

spencergibb avatar Jun 07 '17 18:06 spencergibb