Error Handling in Spring Cloud Gateway Filter Factory

19 Views Asked by At

I have a spring cloud gateway which has 2-3 filter factories which essentially mutates incoming requests to json. So when one of the backend microservices respond with a HTTP-400 or 404 the postman displays 500 Internal Server error. What I want to do is take the exact http response and add custom messages and have that displayed in Postman's response. I went through.

Any idea on how I can proceed?

I tried: https://www.baeldung.com/spring-cloud-global-exception-handling but I am still getting http-500. I was expecting to get the original 400 status back.

0

There are 0 best solutions below