code: @Nullable
    public static com.google.rpc.Status fromThrowable(Throwable t) {
      Throwable cause = checkNotNull(t, "t");
      while (cause != null) {
        if (cause instanceof StatusException) {
          StatusException e = (StatusException) cause;
          return fromStatusAndTrailers(e.getStatus(), e.getTrailers());
        } else if (cause instanceof StatusRuntimeException) {
          StatusRuntimeException e = (StatusRuntimeException) cause;
          return fromStatusAndTrailers(e.getStatus(), e.getTrailers());
        }
        cause = cause.getCause();
      }
      return null;
    }
docs: Extract a {@link com.google.rpc.Status} instance from the causal chain of a {@link Throwable}.
  
  @return the extracted {@link com.google.rpc.Status} instance, or {@code null} if none exists.
  @throws IllegalArgumentException if an embedded {@link com.google.rpc.Status} is found and its
  code does not match the gRPC {@link Status} code.
  @since 1.3.0