[
https://issues.apache.org/jira/browse/CAMEL-13899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913643#comment-16913643
]
Jan Bednar commented on CAMEL-13899:
------------------------------------
Fault was removed in Camel 3.0.0 by CAMEL-13755. I dont think it is worth to
implement something like this just for Camel 2.x.
> 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
> Priority: Major
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> 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)