use of io.netty.handler.codec.DecoderException in project zuul by Netflix.
the class Http2StreamErrorHandler method exceptionCaught.
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (cause instanceof StreamException) {
StreamException streamEx = (StreamException) cause;
ctx.writeAndFlush(new DefaultHttp2ResetFrame(streamEx.error()));
} else if (cause instanceof DecoderException) {
ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.PROTOCOL_ERROR));
} else {
super.exceptionCaught(ctx, cause);
}
}
Aggregations