How to propagate HTTP status code in REST service proxy SwitchYard application in FSW
Issue
- I have a SwitchYard service which basically acts as an proxy to a REST service.
- If an HTTP error code is returned from the REST service, I want the SwitchYard service to return the same HTTP response.
- However, if HTTP
400or some other error code is returned from the REST service, the SwitchYard service simply returns HTTP500. - What is the best way to make sure the SwitchYard service returns the same HTTP error code as is thrown from the REST service?
Environment
- Red Hat JBoss Fuse Service Works (FSW) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
