Bug 1102495 - Revisit exception handling in one way invocations
Summary: Revisit exception handling in one way invocations
Keywords:
Status: MODIFIED
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER1
: ---
Assignee: Rob Cernich
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-29 05:15 UTC by Tadayoshi Sato
Modified: 2021-11-08 10:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (5.20 KB, application/zip)
2014-05-29 05:16 UTC, Tadayoshi Sato
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-2155 0 Major Resolved Revisit exception handling in one way invocations 2015-04-16 14:20:56 UTC

Description Tadayoshi Sato 2014-05-29 05:15:50 UTC
Description of problem:
Platform BZ for https://issues.jboss.org/browse/SWITCHYARD-2155

REST Binding always returns 204 (No Content) for void REST methods even when SwitchYard application throws an exception. Note that a bare RESTEasy app without SY behaves differently, i.e. it returns 204 for void methods only when the REST method returns successfully and instead returns 500 when it throws an error.

I'm attaching a simple reproducer project. Say I have a following REST interface:

@Path("/")
public interface SampleResource {
    @GET
    @Path("/ok")
    void ok();

    @GET
    @Path("/error")
    void error();
}

and have the following Bean service:

@Service(SampleService.class)
public class SampleServiceBean implements SampleService {
    @Override
    public void ok() {
        System.out.println("ok");
    }
    @Override
    public void error() {
        System.out.println("error");
        throw new RuntimeException();
    }
}

Running the Client.java, you will get the following result.

http://localhost:8080/sample/ok    => 204
http://localhost:8080/sample/error => 204

However, what I expect is getting some error (such as 500) for the latter request instead of getting 204.

Comment 1 Tadayoshi Sato 2014-05-29 05:16:40 UTC
Created attachment 900224 [details]
Reproducer


Note You need to log in before you can comment on or make changes to this bug.