You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/03/03 09:29:44 UTC

[jira] Created: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
-------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-2519
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-jetty
    Affects Versions: 2.2.0
            Reporter: Claus Ibsen
            Priority: Minor
             Fix For: 2.3.0


By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead

See nabble:
http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html

For example in DSL directly
{code}
onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58019#action_58019 ] 

Willem Jiang commented on CAMEL-2519:
-------------------------------------

Current walk around solution (without breaking the back ward compatible)  is we need to overrule the Exchange.HTTP_RESPONSE_CODE when the exception is thrown.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-2519.
---------------------------------

    Resolution: Fixed

trunk 
http://svn.apache.org/viewvc?rev=918453&view=rev

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58022#action_58022 ] 

Willem Jiang commented on CAMEL-2519:
-------------------------------------

@Claus,
That is the side effect which we let the user to override the response code when the exception is thrown.
The solution that I have is to remove the "Exchange.HTTP_RESPONSE_CODE" header after the http endpoint or adding the below code in the route
{code}
  onException(IllegalArgumentException.class).setOutHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
{code}

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58024#action_58024 ] 

Willem Jiang edited comment on CAMEL-2519 at 3/4/10 9:09 AM:
-------------------------------------------------------------

Revert my patch ,  http://svn.apache.org/viewvc?rev=918901&view=rev
As the fix caused some side effect, as we can't resolve the Exchange.HTTP conflict without breaking the back compatible.

      was (Author: njiang):
    As the fix caused some side effect, as we can't resolve the Exchange.HTTP conflict without breaking the back compatible.
  
> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-2519:
-----------------------------------

    Assignee: Willem Jiang

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58023#action_58023 ] 

Willem Jiang commented on CAMEL-2519:
-------------------------------------

I agree we can't fix this side effect unless we introduce an HTTP header overrule  mechanism and it will break the back ward compatibility.
I will revert my patch of this issue.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58021#action_58021 ] 

Claus Ibsen commented on CAMEL-2519:
------------------------------------

And since this is a new feature I would rather -1 it to avoid that big problem above ^^^.

The end user can just use a custom {{HttpBinding}} to implement his own logic as he also did.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-2519.
---------------------------------

    Resolution: Won't Fix

As the fix caused some side effect, as we can't resolve the Exchange.HTTP conflict without breaking the back compatible.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57994#action_57994 ] 

Claus Ibsen commented on CAMEL-2519:
------------------------------------

The only issue I can think of is that if you have a route like this
{code}
from jetty -> to http -> bean process (which throw an exception)
{code}

eg we go a {{to("http://somewhere")}} in the middle. Now that one will populate the headers with the response code from calling the {{somewhere}} server.
And that will most likely be 200, which then fools later when an exception is thrown.

Willem can you add such an unit test, and think how we can fix this?

eg. we are bitten by the problem that Roman also pointed out in a couple of days ago. eg information vs. user set headers.




> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58018#action_58018 ] 

Claus Ibsen commented on CAMEL-2519:
------------------------------------

I have just committed an unit test which demonstrates the issue - JettyCallHttpThenExceptionTest.
Its set to be @Ignored. But if you run it, it will fail.

Another issue may be the Content-Length which may have an impact as well.
Also i had to convert to String to ensure I could read the reply properly, I wonder if the Jetty stream will cut it short or something.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57997#action_57997 ] 

Willem Jiang commented on CAMEL-2519:
-------------------------------------

@ Claus,

I just added a test case as you said, and found a way to fix the issue by setting the message header after the onException(Exception.class).

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58020#action_58020 ] 

Claus Ibsen commented on CAMEL-2519:
------------------------------------

Willem take a look at the new unit test and it should make it clear why the code does not work as its now.

You end up with a status code 200 returned to the original client, even if there was an exception thrown and it failed.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reopened CAMEL-2519:
--------------------------------


> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2519) camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58014#action_58014 ] 

Claus Ibsen commented on CAMEL-2519:
------------------------------------

We need to use a special key, something like {{Exchange.HTTP_CUSTOM_RESPONSE_CODE}} which is the header the end user *must* use to set a custom error code.

Otherwise it will clash with {{Exchange.HTTP_RESPONSE_CODE}} which has been set as an information header if you invoked an external http service using eg http, restlet, cxf etc.

> camel-jetty - When returning an exception then allow to use custom http error code from Exchange.HTTP_RESPONSE_CODE
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2519
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2519
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> By default camel-jetty will use http error code 500. But end user may override and set a specific error code to use instead
> See nabble:
> http://old.nabble.com/Return-exception-message-in-HTTP-body-ts27757151.html
> For example in DSL directly
> {code}
> onException(ValidationException).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(HttpServletResponse.SC_BAD_REQUEST));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.