Throwable showRootCause(Optional<StreamOp> op, Throwable cause) { if (cause instanceof Failure) { Failure failure = (Failure) cause; if (failure.isFlagged(Failure.Wrapped())) { try { // if it is a wrapped failure, unwrap it first cause = failure.show(); } catch (IllegalArgumentException iae) { if (op.isPresent()) { logger.warn("Failed to unwrap finagle failure of stream {} : ", op.get().stream, iae); } else { logger.warn("Failed to unwrap finagle failure : ", iae); } } } } return cause; }
Throwable showRootCause(Optional<StreamOp> op, Throwable cause) { if (cause instanceof Failure) { Failure failure = (Failure) cause; if (failure.isFlagged(Failure.Wrapped())) { try { // if it is a wrapped failure, unwrap it first cause = failure.show(); } catch (IllegalArgumentException iae) { if (op.isPresent()) { logger.warn("Failed to unwrap finagle failure of stream {} : ", op.get().stream, iae); } else { logger.warn("Failed to unwrap finagle failure : ", iae); } } } } return cause; }
Throwable showRootCause(Optional<StreamOp> op, Throwable cause) { if (cause instanceof Failure) { Failure failure = (Failure) cause; if (failure.isFlagged(Failure.Wrapped())) { try { // if it is a wrapped failure, unwrap it first cause = failure.show(); } catch (IllegalArgumentException iae) { if (op.isPresent()) { logger.warn("Failed to unwrap finagle failure of stream {} : ", op.get().stream, iae); } else { logger.warn("Failed to unwrap finagle failure : ", iae); } } } } return cause; }