Daniel Diehl created CAMEL-13899:
------------------------------------
Summary: Allow Custom HTTP_RESPONSE_CODE on Fault
Key: CAMEL-13899
URL: https://issues.apache.org/jira/browse/CAMEL-13899
Project: Camel
Issue Type: Improvement
Components: camel-http-common
Reporter: Daniel Diehl
Currently when you set a route as Fault Camel disregards the HTTP_RESPONSE_CODE
reader, not allowing user to set custom STATUS CODE.
To allow more control of the faults the code could check if the user set the
header. If the header is there we use it. otherwise set the default 500.
Example, in this case I would expect the response to be 401, but it was 500
instead:
{code:java}
exchange.getOut().setFault(true);
exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 401);
{code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)