Teodor created CAMEL-20853:
------------------------------

             Summary: Rest routes can not be grouped anymore
                 Key: CAMEL-20853
                 URL: https://issues.apache.org/jira/browse/CAMEL-20853
             Project: Camel
          Issue Type: Bug
          Components: came-core, camel-restlet
    Affects Versions: 4.6.0
         Environment: Java 21; Ubuntu/Windows/Debian;
            Reporter: Teodor
             Fix For: Future


A fully functional demo project was created and published on 
[GitHub|[https://github.com/me0x847206/issue-camel|https://github.com/me0x847206/issue-camel].]].

The issue can be seen as part of the following rest route configuration code:

```
        onException(RuntimeException.class)
                .handled(true)
                .transform()
                .constant("<message>Exception!</message>");

        rest("/say")
                .get("/bye")
                .to("direct:bye");

        from("direct:bye")
                .group("API")
                .transform()
                .constant("<message>Bye World!</message>");

```

Because of the presence of the `onException` section, the `rest:get:/say:/bye` 
rest route does not belong to the `API` group.

If the `onException` part is removed then, the `rest:get:/say:/bye` rest route 
becomes part of the `API` group as expected (and as it worked on previous 
versions).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to