You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2026/10/21 20:00:00 UTC

[jira] [Resolved] (CAMEL-25460) camel-thrift - add a muteException consumer option

     [ https://issues.apache.org/jira/browse/CAMEL-25460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino resolved CAMEL-25460.
--------------------------------------
    Resolution: Fixed

Fixed in 4.24.0 (main) via https://github.com/apache/camel/pull/28154, in 4.22.3 (camel-4.22.x) via https://github.com/apache/camel/pull/28226 and in 4.18.6 (camel-4.18.x) via https://github.com/apache/camel/pull/28236. On camel-4.22.x and camel-4.18.x the synchronous server does not send the exception of a failed exchange to the client, so the muteException option applies to the asynchronous server there.

_Claude Code on behalf of Andrea Cosentino_

> camel-thrift - add a muteException consumer option
> --------------------------------------------------
>
>                 Key: CAMEL-25460
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25460
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.18.6, 4.22.3, 4.24.0
>
>
> CAMEL-23651, and then CAMEL-24428, CAMEL-24476, CAMEL-24477, CAMEL-24478 and CAMEL-25087, gave the consumers that reply to the caller a {{muteException}} option defaulting to {{true}}, so that a failed exchange does not return the exception's message to the remote caller. camel-thrift has no such option.
> In the default asynchronous mode, {{ThriftMethodHandler}} passes the exception of a failed exchange to the Thrift callback:
> {code:java}
> Exception exception = exchange.getException();
> if (exception != null) {
>     callback.onError(exception);
>     return;
> }
> {code}
> The processor that the Thrift compiler generates sends any exception the method does not declare as {{new TApplicationException(TApplicationException.INTERNAL_ERROR, e.getMessage())}}. Since CAMEL-25247 the synchronous handler throws the exception instead. libthrift then answers most exceptions with a generic "Internal error processing <method>", but sends a {{TApplicationException}} with its own message. That includes one returned to the route by a downstream Thrift call. CAMEL-25247 is only on main, so on camel-4.22.x and camel-4.18.x only the asynchronous handler is concerned.
> Proposal: add a {{muteException}} consumer option, defaulting to {{true}}. When enabled, both servers answer any exception that the Thrift method does not declare with a generic {{TApplicationException(INTERNAL_ERROR)}}. Exceptions declared in the IDL, such as {{throws (1:InvalidOperation ouch)}}, belong to the service contract and are still sent as they are. Add an upgrade-guide entry saying that routes relying on the detail must set {{muteException=false}}.
> _Claude Code on behalf of oscerd_



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