use of com.netflix.zuul.netty.connectionpool.OriginConnectException in project zuul by Netflix.
the class OriginResponseReceiver method channelInactive.
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
if (edgeProxy != null) {
LOG.debug("Origin channel inactive. channel-info={}", ChannelUtils.channelInfoForLogging(ctx.channel()));
OriginConnectException ex = new OriginConnectException("Origin server inactive", RESET_CONNECTION);
edgeProxy.errorFromOrigin(ex);
}
super.channelInactive(ctx);
ctx.close();
}
use of com.netflix.zuul.netty.connectionpool.OriginConnectException in project zuul by Netflix.
the class RequestAttempt method setException.
public void setException(Throwable t) {
if (t != null) {
if (t instanceof ReadTimeoutException) {
error = "READ_TIMEOUT";
exceptionType = t.getClass().getSimpleName();
} else if (t instanceof OriginConnectException) {
OriginConnectException oce = (OriginConnectException) t;
if (oce.getErrorType() != null) {
error = oce.getErrorType().toString();
} else {
error = "ORIGIN_CONNECT_ERROR";
}
final Throwable cause = t.getCause();
if (cause != null) {
exceptionType = t.getCause().getClass().getSimpleName();
} else {
exceptionType = t.getClass().getSimpleName();
}
} else if (t instanceof OutboundException) {
OutboundException obe = (OutboundException) t;
error = obe.getOutboundErrorType().toString();
exceptionType = OutboundException.class.getSimpleName();
} else if (t instanceof SSLHandshakeException) {
error = t.getMessage();
exceptionType = t.getClass().getSimpleName();
cause = t.getCause().getMessage();
} else {
error = t.getMessage();
exceptionType = t.getClass().getSimpleName();
cause = Throwables.getStackTraceAsString(t);
}
}
}
Aggregations