This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 6cea553aa42e CAMEL-23651: align muteException default in netty-http 
and undertow
6cea553aa42e is described below

commit 6cea553aa42ed1326ac57ad800d66674bc453932
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Jun 10 18:23:46 2026 +0200

    CAMEL-23651: align muteException default in netty-http and undertow
    
    camel-netty-http and camel-undertow now default the muteException
    consumer option to true, aligning them with the other HTTP server
    components (camel-http, camel-jetty, camel-servlet and
    camel-platform-http). When an exchange fails processing on the
    consumer side, the HTTP response now has an empty body instead of
    returning the exception stack trace as text/plain.
    
    The default is flipped at both component and endpoint level in both
    components. In camel-undertow the Rest DSL consumer path now also
    propagates the endpoint muteException value to the
    RestUndertowHttpBinding, which previously hard-coded it to false and
    silently ignored the option in Rest DSL mode.
    
    muteException keeps taking precedence over transferException, as in
    the other HTTP server components. Routes that rely on the stack trace
    in the response body must set muteException=false explicitly.
    
    Includes new tests for the default behaviour (plain consumers and
    undertow Rest DSL), updated tests opting out explicitly, regenerated
    metadata (component JSONs, catalog, endpoint/component DSL) and a
    4.21 upgrade-guide entry.
    
    Closes #23913
---
 .../camel/catalog/components/netty-http.json       |  4 +--
 .../apache/camel/catalog/components/undertow.json  |  4 +--
 .../camel/component/netty/http/netty-http.json     |  4 +--
 .../component/netty/http/NettyHttpComponent.java   |  4 +--
 .../netty/http/NettyHttpConfiguration.java         |  4 +--
 ...ettyHttp500ErrorThrowExceptionOnServerTest.java |  2 +-
 .../http/NettyHttpMuteExceptionByDefaultTest.java} | 33 ++++++++++------------
 .../netty/http/NettyHttpTransferExceptionTest.java |  2 +-
 .../apache/camel/component/undertow/undertow.json  |  4 +--
 .../component/undertow/UndertowComponent.java      |  8 ++++--
 .../camel/component/undertow/UndertowEndpoint.java |  4 +--
 ...ava => UndertowMuteExceptionByDefaultTest.java} | 23 +++++++--------
 .../undertow/UndertowTransferExceptionTest.java    |  3 +-
 .../RestUndertowMuteExceptionByDefaultTest.java}   | 33 ++++++++++++----------
 .../ROOT/pages/camel-4x-upgrade-guide-4_21.adoc    | 25 ++++++++++++++++
 .../dsl/NettyHttpComponentBuilderFactory.java      |  2 +-
 .../dsl/UndertowComponentBuilderFactory.java       |  2 +-
 .../dsl/NettyHttpEndpointBuilderFactory.java       |  4 +--
 .../dsl/UndertowEndpointBuilderFactory.java        |  4 +--
 19 files changed, 97 insertions(+), 72 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json
index a47a99d41618..a1384ba36274 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json
@@ -35,7 +35,7 @@
     "networkInterface": { "index": 7, "kind": "property", "displayName": 
"Network Interface", "group": "common (advanced)", "label": "common,advanced", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "When using UDP then this option can be used to 
specify a network interface by its [...]
     "bridgeErrorHandler": { "index": 8, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the like [...]
     "clientMode": { "index": 9, "kind": "property", "displayName": "Client 
Mode", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "If the clientMode is true, netty consumer will 
connect the address as a TCP client." },
-    "muteException": { "index": 10, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "If enabled and 
an Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
+    "muteException": { "index": 10, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "If enabled and an 
Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
     "reconnect": { "index": 11, "kind": "property", "displayName": 
"Reconnect", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "Used only in clientMode in consumer, the 
consumer will attempt to reconnect on disconnection if t [...]
     "reconnectInterval": { "index": 12, "kind": "property", "displayName": 
"Reconnect Interval", "group": "consumer", "label": "consumer", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 10000, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "Used if reconnect and clientMode is enabled. 
The interval in milli seconds to attem [...]
     "backlog": { "index": 13, "kind": "property", "displayName": "Backlog", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "Allows to configure a backlog for netty 
consumer (server). Note the backlog is just a best effort depending [...]
@@ -144,7 +144,7 @@
     "sync": { "index": 9, "kind": "parameter", "displayName": "Sync", "group": 
"common", "label": "", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Setting to set endpoint 
as one-way (false) or request-response (true)" },
     "tcpNoDelay": { "index": 10, "kind": "parameter", "displayName": "Tcp No 
Delay", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Setting to improve TCP 
protocol performance" },
     "matchOnUriPrefix": { "index": 11, "kind": "parameter", "displayName": 
"Match On Uri Prefix", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Whether or not Camel 
should try to find a target consumer by matching [...]
-    "muteException": { "index": 12, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "If enabled and an 
Exchange failed processing on the consumer side the respons [...]
+    "muteException": { "index": 12, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "If enabled and an 
Exchange failed processing on the consumer side the response [...]
     "send503whenSuspended": { "index": 13, "kind": "parameter", "displayName": 
"Send503when Suspended", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Whether to send back 
HTTP status code 503 when the consumer has  [...]
     "backlog": { "index": 14, "kind": "parameter", "displayName": "Backlog", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Allows to configure a 
backlog for netty consumer (server). Note the backlog is just a best effort 
[...]
     "bossCount": { "index": 15, "kind": "parameter", "displayName": "Boss 
Count", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "When netty works on nio 
mode, it uses default bossCount parameter from Ne [...]
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/undertow.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/undertow.json
index c9dbcaa8020d..9999988a0541 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/undertow.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/undertow.json
@@ -26,7 +26,7 @@
   },
   "componentProperties": {
     "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the like [...]
-    "muteException": { "index": 1, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "If enabled and 
an Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
+    "muteException": { "index": 1, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "If enabled and an 
Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
     "lazyStartProducer": { "index": 2, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
     "autowiredEnabled": { "index": 3, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
     "hostOptions": { "index": 4, "kind": "property", "displayName": "Host 
Options", "group": "advanced", "label": "advanced", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.undertow.UndertowHostOptions", "deprecated": false, 
"autowired": false, "secret": false, "description": "To configure common 
options, such as thread pools" },
@@ -60,7 +60,7 @@
     "accessLog": { "index": 2, "kind": "parameter", "displayName": "Access 
Log", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether or not 
the consumer should write access log" },
     "httpMethodRestrict": { "index": 3, "kind": "parameter", "displayName": 
"Http Method Restrict", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Used to only allow 
consuming if the HttpMethod matches, such as GET\/POST\/PUT etc. Multiple 
methods can be specified separated by comma." },
     "matchOnUriPrefix": { "index": 4, "kind": "parameter", "displayName": 
"Match On Uri Prefix", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether or not the consumer should try to find a target consumer by matching 
the URI prefix if no exact match is found." },
-    "muteException": { "index": 5, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "If 
enabled and an Exchange failed processing on the consumer side the response's 
body won't contain the exception's stack trace." },
+    "muteException": { "index": 5, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": "If 
enabled and an Exchange failed processing on the consumer side the response's 
body won't contain the exception's stack trace." },
     "optionsEnabled": { "index": 6, "kind": "parameter", "displayName": 
"Options Enabled", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Specifies 
whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is 
turned off." },
     "transferException": { "index": 7, "kind": "parameter", "displayName": 
"Transfer Exception", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "security": "insecure:serialization", 
"defaultValue": false, "description": "If enabled and an Exchange failed 
processing on the consumer side and if the caused Exception was send back 
serialized in the response as a applica [...]
     "bridgeErrorHandler": { "index": 8, "kind": "parameter", "displayName": 
"Bridge Error Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions (if possible) occurred 
while the Camel consumer is trying to pickup incoming  [...]
diff --git 
a/components/camel-netty-http/src/generated/resources/META-INF/org/apache/camel/component/netty/http/netty-http.json
 
b/components/camel-netty-http/src/generated/resources/META-INF/org/apache/camel/component/netty/http/netty-http.json
index a47a99d41618..a1384ba36274 100644
--- 
a/components/camel-netty-http/src/generated/resources/META-INF/org/apache/camel/component/netty/http/netty-http.json
+++ 
b/components/camel-netty-http/src/generated/resources/META-INF/org/apache/camel/component/netty/http/netty-http.json
@@ -35,7 +35,7 @@
     "networkInterface": { "index": 7, "kind": "property", "displayName": 
"Network Interface", "group": "common (advanced)", "label": "common,advanced", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "When using UDP then this option can be used to 
specify a network interface by its [...]
     "bridgeErrorHandler": { "index": 8, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the like [...]
     "clientMode": { "index": 9, "kind": "property", "displayName": "Client 
Mode", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "If the clientMode is true, netty consumer will 
connect the address as a TCP client." },
-    "muteException": { "index": 10, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "If enabled and 
an Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
+    "muteException": { "index": 10, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "If enabled and an 
Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
     "reconnect": { "index": 11, "kind": "property", "displayName": 
"Reconnect", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "Used only in clientMode in consumer, the 
consumer will attempt to reconnect on disconnection if t [...]
     "reconnectInterval": { "index": 12, "kind": "property", "displayName": 
"Reconnect Interval", "group": "consumer", "label": "consumer", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 10000, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "Used if reconnect and clientMode is enabled. 
The interval in milli seconds to attem [...]
     "backlog": { "index": 13, "kind": "property", "displayName": "Backlog", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.netty.NettyConfiguration", "configurationField": 
"configuration", "description": "Allows to configure a backlog for netty 
consumer (server). Note the backlog is just a best effort depending [...]
@@ -144,7 +144,7 @@
     "sync": { "index": 9, "kind": "parameter", "displayName": "Sync", "group": 
"common", "label": "", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Setting to set endpoint 
as one-way (false) or request-response (true)" },
     "tcpNoDelay": { "index": 10, "kind": "parameter", "displayName": "Tcp No 
Delay", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Setting to improve TCP 
protocol performance" },
     "matchOnUriPrefix": { "index": 11, "kind": "parameter", "displayName": 
"Match On Uri Prefix", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Whether or not Camel 
should try to find a target consumer by matching [...]
-    "muteException": { "index": 12, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "If enabled and an 
Exchange failed processing on the consumer side the respons [...]
+    "muteException": { "index": 12, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "If enabled and an 
Exchange failed processing on the consumer side the response [...]
     "send503whenSuspended": { "index": 13, "kind": "parameter", "displayName": 
"Send503when Suspended", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Whether to send back 
HTTP status code 503 when the consumer has  [...]
     "backlog": { "index": 14, "kind": "parameter", "displayName": "Backlog", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "Allows to configure a 
backlog for netty consumer (server). Note the backlog is just a best effort 
[...]
     "bossCount": { "index": 15, "kind": "parameter", "displayName": "Boss 
Count", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1, "configurationClass": 
"org.apache.camel.component.netty.http.NettyHttpConfiguration", 
"configurationField": "configuration", "description": "When netty works on nio 
mode, it uses default bossCount parameter from Ne [...]
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
index ed4b2741cd3a..57559723c8d5 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
@@ -74,8 +74,8 @@ public class NettyHttpComponent extends NettyComponent
     private NettyHttpSecurityConfiguration securityConfiguration;
     @Metadata(label = "security", defaultValue = "false")
     private boolean useGlobalSslContextParameters;
-    @Metadata(label = "consumer")
-    private boolean muteException;
+    @Metadata(label = "consumer", defaultValue = "true")
+    private boolean muteException = true;
 
     public NettyHttpComponent() {
         // use the http configuration and filter strategy
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
index 40b7974860b7..893d7fb61fda 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
@@ -55,8 +55,8 @@ public class NettyHttpConfiguration extends 
NettyConfiguration {
     private boolean transferException;
     @UriParam(label = "advanced,security")
     private String deserializationFilter;
-    @UriParam(label = "consumer")
-    private boolean muteException;
+    @UriParam(label = "consumer", defaultValue = "true")
+    private boolean muteException = true;
     @UriParam(label = "consumer")
     private boolean matchOnUriPrefix;
     @UriParam(label = "consumer,advanced", defaultValue = "true")
diff --git 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttp500ErrorThrowExceptionOnServerTest.java
 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttp500ErrorThrowExceptionOnServerTest.java
index 0a38eec83a9c..8c52530a9f09 100644
--- 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttp500ErrorThrowExceptionOnServerTest.java
+++ 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttp500ErrorThrowExceptionOnServerTest.java
@@ -62,7 +62,7 @@ public class NettyHttp500ErrorThrowExceptionOnServerTest 
extends BaseNettyTestSu
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("netty-http:http://0.0.0.0:{{port}}/foo";)
+                
from("netty-http:http://0.0.0.0:{{port}}/foo?muteException=false";)
                         .to("mock:input")
                         .throwException(new IllegalArgumentException("Camel 
cannot do this"));
             }
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMuteExceptionByDefaultTest.java
similarity index 64%
copy from 
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
copy to 
components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMuteExceptionByDefaultTest.java
index 4ce054564d09..27a1f2e357f0 100644
--- 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
+++ 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMuteExceptionByDefaultTest.java
@@ -14,45 +14,42 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.undertow;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
+package org.apache.camel.component.netty.http;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.hc.client5.http.classic.methods.HttpGet;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-public class UndertowTransferExceptionTest extends BaseUndertowTest {
+public class NettyHttpMuteExceptionByDefaultTest extends BaseNettyTestSupport {
 
     @Test
-    public void getSerializedExceptionTest() throws IOException, 
ClassNotFoundException {
-        HttpGet get = new HttpGet("http://localhost:"; + getPort() + 
"/test/transfer");
-        get.addHeader("Accept", "application/x-java-serialized-object");
-
-        try (CloseableHttpClient httpClient = HttpClients.createDefault();
-             CloseableHttpResponse response = httpClient.execute(get)) {
-
-            ObjectInputStream in = new 
ObjectInputStream(response.getEntity().getContent());
-            IllegalArgumentException e = (IllegalArgumentException) 
in.readObject();
-            assertNotNull(e);
+    public void testMuteExceptionByDefault() throws Exception {
+        HttpGet get = new HttpGet("http://localhost:"; + getPort() + "/foo");
+        get.addHeader("Accept", "application/text");
+        try (CloseableHttpClient client = HttpClients.createDefault();
+             CloseableHttpResponse response = client.execute(get)) {
+            String body = EntityUtils.toString(response.getEntity(), "UTF-8");
+            assertNotNull(body);
+            assertEquals("", body);
             assertEquals(500, response.getCode());
-            assertEquals("Camel cannot do this", e.getMessage());
         }
     }
 
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-
+            @Override
             public void configure() {
-                from("undertow:http://localhost:"; + getPort() + 
"/test/transfer?transferException=true").to("mock:input")
+                // muteException is not configured so the default (true) 
applies
+                from("netty-http:http://0.0.0.0:{{port}}/foo";)
+                        .to("mock:input")
                         .throwException(new IllegalArgumentException("Camel 
cannot do this"));
             }
         };
diff --git 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpTransferExceptionTest.java
 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpTransferExceptionTest.java
index 46f871586c4f..d272b155ac1f 100644
--- 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpTransferExceptionTest.java
+++ 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpTransferExceptionTest.java
@@ -46,7 +46,7 @@ public class NettyHttpTransferExceptionTest extends 
BaseNettyTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                
from("netty-http:http://0.0.0.0:{{port}}/foo?transferException=true";)
+                
from("netty-http:http://0.0.0.0:{{port}}/foo?muteException=false&transferException=true";)
                         .to("mock:input")
                         .throwException(new IllegalArgumentException("Camel 
cannot do this"));
             }
diff --git 
a/components/camel-undertow/src/generated/resources/META-INF/org/apache/camel/component/undertow/undertow.json
 
b/components/camel-undertow/src/generated/resources/META-INF/org/apache/camel/component/undertow/undertow.json
index c9dbcaa8020d..9999988a0541 100644
--- 
a/components/camel-undertow/src/generated/resources/META-INF/org/apache/camel/component/undertow/undertow.json
+++ 
b/components/camel-undertow/src/generated/resources/META-INF/org/apache/camel/component/undertow/undertow.json
@@ -26,7 +26,7 @@
   },
   "componentProperties": {
     "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the like [...]
-    "muteException": { "index": 1, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "If enabled and 
an Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
+    "muteException": { "index": 1, "kind": "property", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "If enabled and an 
Exchange failed processing on the consumer side the response's body won't 
contain the exception's stack trace." },
     "lazyStartProducer": { "index": 2, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
     "autowiredEnabled": { "index": 3, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
     "hostOptions": { "index": 4, "kind": "property", "displayName": "Host 
Options", "group": "advanced", "label": "advanced", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.undertow.UndertowHostOptions", "deprecated": false, 
"autowired": false, "secret": false, "description": "To configure common 
options, such as thread pools" },
@@ -60,7 +60,7 @@
     "accessLog": { "index": 2, "kind": "parameter", "displayName": "Access 
Log", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether or not 
the consumer should write access log" },
     "httpMethodRestrict": { "index": 3, "kind": "parameter", "displayName": 
"Http Method Restrict", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Used to only allow 
consuming if the HttpMethod matches, such as GET\/POST\/PUT etc. Multiple 
methods can be specified separated by comma." },
     "matchOnUriPrefix": { "index": 4, "kind": "parameter", "displayName": 
"Match On Uri Prefix", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether or not the consumer should try to find a target consumer by matching 
the URI prefix if no exact match is found." },
-    "muteException": { "index": 5, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "If 
enabled and an Exchange failed processing on the consumer side the response's 
body won't contain the exception's stack trace." },
+    "muteException": { "index": 5, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": "If 
enabled and an Exchange failed processing on the consumer side the response's 
body won't contain the exception's stack trace." },
     "optionsEnabled": { "index": 6, "kind": "parameter", "displayName": 
"Options Enabled", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Specifies 
whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is 
turned off." },
     "transferException": { "index": 7, "kind": "parameter", "displayName": 
"Transfer Exception", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "security": "insecure:serialization", 
"defaultValue": false, "description": "If enabled and an Exchange failed 
processing on the consumer side and if the caused Exception was send back 
serialized in the response as a applica [...]
     "bridgeErrorHandler": { "index": 8, "kind": "parameter", "displayName": 
"Bridge Error Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions (if possible) occurred 
while the Camel consumer is trying to pickup incoming  [...]
diff --git 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
index 9b57bb5b6a63..67bf2ca62113 100644
--- 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
+++ 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
@@ -81,8 +81,8 @@ public class UndertowComponent extends DefaultComponent
     private boolean useGlobalSslContextParameters;
     @Metadata(label = "advanced")
     private UndertowHostOptions hostOptions;
-    @Metadata(label = "consumer")
-    private boolean muteException;
+    @Metadata(label = "consumer", defaultValue = "true")
+    private boolean muteException = true;
     @Metadata(label = "security")
     private Object securityConfiguration;
     @Metadata(label = "security")
@@ -271,7 +271,9 @@ public class UndertowComponent extends DefaultComponent
 
         if (!map.containsKey("undertowHttpBinding")) {
             // use the rest binding, if not using a custom http binding
-            endpoint.setUndertowHttpBinding(new 
RestUndertowHttpBinding(endpoint.isUseStreaming()));
+            UndertowHttpBinding binding = new 
RestUndertowHttpBinding(endpoint.isUseStreaming());
+            binding.setMuteException(endpoint.getMuteException());
+            endpoint.setUndertowHttpBinding(binding);
         }
 
         // configure consumer properties
diff --git 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
index 125c8fa35fa4..894125fdf323 100644
--- 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
+++ 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
@@ -94,8 +94,8 @@ public class UndertowEndpoint extends DefaultEndpoint
     private Boolean throwExceptionOnFailure = Boolean.TRUE;
     @UriParam(label = "consumer", defaultValue = "false", security = 
"insecure:serialization")
     private Boolean transferException = Boolean.FALSE;
-    @UriParam(label = "consumer", defaultValue = "false")
-    private Boolean muteException = Boolean.FALSE;
+    @UriParam(label = "consumer", defaultValue = "true")
+    private Boolean muteException = Boolean.TRUE;
     @UriParam(label = "producer", defaultValue = "true")
     private Boolean keepAlive = Boolean.TRUE;
     @UriParam(label = "producer", defaultValue = "true")
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowMuteExceptionByDefaultTest.java
similarity index 74%
copy from 
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
copy to 
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowMuteExceptionByDefaultTest.java
index 4ce054564d09..bbe93586a275 100644
--- 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
+++ 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowMuteExceptionByDefaultTest.java
@@ -16,34 +16,30 @@
  */
 package org.apache.camel.component.undertow;
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
-
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.hc.client5.http.classic.methods.HttpGet;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-public class UndertowTransferExceptionTest extends BaseUndertowTest {
+public class UndertowMuteExceptionByDefaultTest extends BaseUndertowTest {
 
     @Test
-    public void getSerializedExceptionTest() throws IOException, 
ClassNotFoundException {
-        HttpGet get = new HttpGet("http://localhost:"; + getPort() + 
"/test/transfer");
-        get.addHeader("Accept", "application/x-java-serialized-object");
-
+    public void muteExceptionByDefaultTest() throws Exception {
+        HttpGet get = new HttpGet("http://localhost:"; + getPort() + 
"/test/mute");
+        get.addHeader("Accept", "application/text");
         try (CloseableHttpClient httpClient = HttpClients.createDefault();
              CloseableHttpResponse response = httpClient.execute(get)) {
 
-            ObjectInputStream in = new 
ObjectInputStream(response.getEntity().getContent());
-            IllegalArgumentException e = (IllegalArgumentException) 
in.readObject();
-            assertNotNull(e);
+            String responseString = EntityUtils.toString(response.getEntity(), 
"UTF-8");
+            assertNotNull(responseString);
+            assertEquals("", responseString);
             assertEquals(500, response.getCode());
-            assertEquals("Camel cannot do this", e.getMessage());
         }
     }
 
@@ -52,7 +48,8 @@ public class UndertowTransferExceptionTest extends 
BaseUndertowTest {
         return new RouteBuilder() {
 
             public void configure() {
-                from("undertow:http://localhost:"; + getPort() + 
"/test/transfer?transferException=true").to("mock:input")
+                // muteException is not configured so the default (true) 
applies
+                from("undertow:http://localhost:"; + getPort() + 
"/test/mute").to("mock:input")
                         .throwException(new IllegalArgumentException("Camel 
cannot do this"));
             }
         };
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
index 4ce054564d09..677b00591d17 100644
--- 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
+++ 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
@@ -52,7 +52,8 @@ public class UndertowTransferExceptionTest extends 
BaseUndertowTest {
         return new RouteBuilder() {
 
             public void configure() {
-                from("undertow:http://localhost:"; + getPort() + 
"/test/transfer?transferException=true").to("mock:input")
+                from("undertow:http://localhost:"; + getPort() + 
"/test/transfer?muteException=false&transferException=true")
+                        .to("mock:input")
                         .throwException(new IllegalArgumentException("Camel 
cannot do this"));
             }
         };
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMuteExceptionByDefaultTest.java
similarity index 67%
copy from 
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
copy to 
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMuteExceptionByDefaultTest.java
index 4ce054564d09..79c0457ad749 100644
--- 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowTransferExceptionTest.java
+++ 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMuteExceptionByDefaultTest.java
@@ -14,45 +14,48 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.undertow;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
+package org.apache.camel.component.undertow.rest;
 
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.undertow.BaseUndertowTest;
 import org.apache.hc.client5.http.classic.methods.HttpGet;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-public class UndertowTransferExceptionTest extends BaseUndertowTest {
+public class RestUndertowMuteExceptionByDefaultTest extends BaseUndertowTest {
 
     @Test
-    public void getSerializedExceptionTest() throws IOException, 
ClassNotFoundException {
-        HttpGet get = new HttpGet("http://localhost:"; + getPort() + 
"/test/transfer");
-        get.addHeader("Accept", "application/x-java-serialized-object");
-
+    public void muteExceptionByDefaultTest() throws Exception {
+        HttpGet get = new HttpGet("http://localhost:"; + getPort() + 
"/api/fail");
+        get.addHeader("Accept", "application/text");
         try (CloseableHttpClient httpClient = HttpClients.createDefault();
              CloseableHttpResponse response = httpClient.execute(get)) {
 
-            ObjectInputStream in = new 
ObjectInputStream(response.getEntity().getContent());
-            IllegalArgumentException e = (IllegalArgumentException) 
in.readObject();
-            assertNotNull(e);
+            String responseString = EntityUtils.toString(response.getEntity(), 
"UTF-8");
+            assertNotNull(responseString);
+            assertEquals("", responseString);
             assertEquals(500, response.getCode());
-            assertEquals("Camel cannot do this", e.getMessage());
         }
     }
 
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-
+            @Override
             public void configure() {
-                from("undertow:http://localhost:"; + getPort() + 
"/test/transfer?transferException=true").to("mock:input")
+                
restConfiguration().component("undertow").host("localhost").port(getPort());
+
+                // muteException is not configured so the default (true) 
applies
+                rest("/api")
+                        .get("fail").to("direct:fail");
+
+                from("direct:fail")
                         .throwException(new IllegalArgumentException("Camel 
cannot do this"));
             }
         };
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index ec098f631004..fa6b65448c7b 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -1191,6 +1191,31 @@ Routes that intentionally relied on undertow mapping 
`websocket.*` wire
 headers in or out can supply a custom `headerFilterStrategy` endpoint option
 to restore the previous behaviour.
 
+=== camel-netty-http / camel-undertow - potential breaking change
+
+The `muteException` consumer option now defaults to `true` in 
`camel-netty-http` and
+`camel-undertow`, aligning these components with the other HTTP server 
components
+(`camel-http`, `camel-jetty`, `camel-servlet`, and `camel-platform-http`), 
which have
+been defaulting `muteException` to `true` for a long time.
+
+When an exchange fails processing on the consumer side, the HTTP response now 
has an
+empty body. Previously the response body contained the exception stack trace as
+`text/plain`.
+
+Routes that rely on the exception stack trace being present in the response 
body must
+set `muteException=false` explicitly on the endpoint or component after the 
upgrade:
+
+[source,text]
+----
+netty-http:http://0.0.0.0:8080/foo?muteException=false
+undertow:http://0.0.0.0:8080/foo?muteException=false
+----
+
+Note that `muteException` takes precedence over `transferException`, as it 
already does
+in the other HTTP server components. Routes using `transferException=true` on 
these two
+components must now also set `muteException=false` for the serialized 
exception to be
+returned in the response.
+
 === camel-web3j - potential breaking change
 
 The Exchange header constants in `Web3jConstants` have been renamed to follow 
the
diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java
index 0034c189d903..d8036cb42c42 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java
@@ -248,7 +248,7 @@ public interface NettyHttpComponentBuilderFactory {
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
-         * Default: false
+         * Default: true
          * Group: consumer
          * 
          * @param muteException the value to set
diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/UndertowComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/UndertowComponentBuilderFactory.java
index efe30b25302b..a315e4cc8c5b 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/UndertowComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/UndertowComponentBuilderFactory.java
@@ -87,7 +87,7 @@ public interface UndertowComponentBuilderFactory {
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
-         * Default: false
+         * Default: true
          * Group: consumer
          * 
          * @param muteException the value to set
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java
index 293361999ec5..f88757a4fce7 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java
@@ -323,7 +323,7 @@ public interface NettyHttpEndpointBuilderFactory {
          * 
          * The option is a: <code>boolean</code> type.
          * 
-         * Default: false
+         * Default: true
          * Group: consumer
          * 
          * @param muteException the value to set
@@ -339,7 +339,7 @@ public interface NettyHttpEndpointBuilderFactory {
          * 
          * The option will be converted to a <code>boolean</code> type.
          * 
-         * Default: false
+         * Default: true
          * Group: consumer
          * 
          * @param muteException the value to set
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/UndertowEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/UndertowEndpointBuilderFactory.java
index d6f43e9b7dbe..75e9ac7d010e 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/UndertowEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/UndertowEndpointBuilderFactory.java
@@ -172,7 +172,7 @@ public interface UndertowEndpointBuilderFactory {
          * 
          * The option is a: <code>java.lang.Boolean</code> type.
          * 
-         * Default: false
+         * Default: true
          * Group: consumer
          * 
          * @param muteException the value to set
@@ -189,7 +189,7 @@ public interface UndertowEndpointBuilderFactory {
          * The option will be converted to a <code>java.lang.Boolean</code>
          * type.
          * 
-         * Default: false
+         * Default: true
          * Group: consumer
          * 
          * @param muteException the value to set

Reply via email to