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
400
or 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, tools, and much more.