This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new dfadaaf CAMEL-14195: Add logging to capture Decoder exceptions at
error level (#3358)
dfadaaf is described below
commit dfadaaf578ee14b59729d3304f034aa579361878
Author: Bob Paulin <[email protected]>
AuthorDate: Fri Nov 22 02:03:10 2019 -0600
CAMEL-14195: Add logging to capture Decoder exceptions at error level
(#3358)
---
.../component/netty/http/handlers/HttpServerChannelHandler.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
index 9b0f64c..f871c4b 100644
---
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
+++
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
@@ -26,6 +26,7 @@ import javax.security.auth.login.LoginException;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
+import io.netty.handler.codec.DecoderResult;
import io.netty.handler.codec.base64.Base64;
import io.netty.handler.codec.http.DefaultHttpResponse;
import io.netty.handler.codec.http.HttpHeaderNames;
@@ -87,6 +88,12 @@ public class HttpServerChannelHandler extends
ServerChannelHandler {
LOG.debug("Message received: {}", request);
+ DecoderResult decoderResult = request.decoderResult();
+
+ if(decoderResult != null && decoderResult.cause() != null) {
+ LOG.error("Netty Request Decoder Failure: {}",
decoderResult.cause().getMessage());
+ }
+
if (consumer.isSuspended()) {
// are we suspended?
LOG.debug("Consumer suspended, cannot service request {}",
request);