public static Throwable getRootCause(Throwable t) {
    Throwable throwable = t;
    while (throwable != null && throwable.getCause() != null) {
      throwable = throwable.getCause();
    }
    return throwable;
  }
Gets the root cause for {@code t}.
@param t the {@link Throwable} whose root cause is required.
@return the root cause for {@code t}.
ambry-utils/src/main/java/com/github/ambry/utils/Utils.java