docs: public static RuntimeException from(ByteBuf frame) {
      Objects.requireNonNull(frame, "frame must not be null");
  
      int errorCode = ErrorFrameFlyweight.errorCode(frame);
      String message = ErrorFrameFlyweight.dataUtf8(frame);
  
      switch (errorCode) {
        case APPLICATION_ERROR:
          return new ApplicationErrorException(message);
        case CANCELED:
          return new CanceledException(message);
        case CONNECTION_CLOSE:
          return new ConnectionCloseException(message);
        case CONNECTION_ERROR:
          return new ConnectionErrorException(message);
        case INVALID:
          return new InvalidException(message);
        case INVALID_SETUP:
          return new InvalidSetupException(message);
        case REJECTED:
          return new RejectedException(message);
        case REJECTED_RESUME:
          return new RejectedResumeException(message);
        case REJECTED_SETUP:
          return new RejectedSetupException(message);
        case UNSUPPORTED_SETUP:
          return new UnsupportedSetupException(message);
        default:
          return new IllegalArgumentException(
              String.format("Invalid Error frame: %d '%s'", errorCode, message));
      }
    }