Issue Type: Enhancement Enhancement
Affects Versions: 2.0
Assignee: Unassigned
Components: component-resteasy
Created: 29/Jan/14 11:34 AM
Description:

I think the following catch logic in InboundHandler might benefit from a small change:

https://github.com/jboss-switchyard/components/blob/master/resteasy/src/main/java/org/switchyard/component/resteasy/InboundHandler.java#L114

        try {
            message = _messageComposer.compose(restMessageRequest, exchange);
        } catch (Exception e) {
            RestEasyLogger.ROOT_LOGGER.unexpectedExceptionComposingInboundMessage(e);
            throw new WebApplicationException(e);
        }

Maybe something like this:

        try {
            message = _messageComposer.compose(restMessageRequest, exchange);
        } catch (WebApplicationException wae) {
            throw wae;
        } catch (Exception e) {
            RestEasyLogger.ROOT_LOGGER.unexpectedExceptionComposingInboundMessage(e);
            throw new WebApplicationException(e);
        }

This would allow a custom message composer to generate and format a custom error response. Right now, throwing a WAE from a composer ends up with a wrapped exception which always has a default return code (500) and message (server error).

Fix Versions: 2.0
Project: SwitchYard
Priority: Major Major
Reporter: Keith Babo
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira