code: public static Status fromThrowable(Throwable t) {
          requireNonNull(t, "t");
  
          Throwable cause = t;
          while (cause != null) {
              if (cause instanceof ArmeriaStatusException) {
                  t = StatusExceptionConverter.toGrpc((ArmeriaStatusException) cause);
                  break;
              }
              cause = cause.getCause();
          }
  
          final Status s = Status.fromThrowable(t);
          if (s.getCode() != Code.UNKNOWN) {
              return s;
          }
          if (t instanceof StreamException) {
              final StreamException streamException = (StreamException) t;
              if (streamException.getMessage() != null && streamException.getMessage().contains("RST_STREAM")) {
                  return Status.CANCELLED;
              }
          }
          if (t instanceof ClosedChannelException) {
              // ClosedChannelException is used any time the Netty channel is closed. Proper error
              // processing requires remembering the error that occurred before this one and using it
              // instead.
              return Status.UNKNOWN.withCause(t);
          }
          if (t instanceof IOException) {
              return Status.UNAVAILABLE.withCause(t);
          }
          if (t instanceof Http2Exception) {
              return Status.INTERNAL.withCause(t);
          }
          if (t instanceof TimeoutException) {
              return Status.DEADLINE_EXCEEDED.withCause(t);
          }
          return s;
      }
docs: Converts the {@link Throwable} to a {@link Status}, taking into account exceptions specific to Armeria as
  well and the protocol package.