public static TSStatus getStatus(List<TSStatus> statusList) {
    TSStatus status = new TSStatus(TSStatusCode.MULTIPLE_ERROR.getStatusCode());
    status.setSubStatus(statusList);
    if (LOGGER.isDebugEnabled()) {
      StringBuilder errMsg = new StringBuilder().append("Multiple error occur, messages: ");
      Set<TSStatus> msgSet = new HashSet<>();
      for (TSStatus subStatus : statusList) {
        if (subStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()
            && subStatus.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
          if (!msgSet.contains(status)) {
            errMsg.append(status).append("; ");
            msgSet.add(status);
          }
        }
      }
      LOGGER.debug(errMsg.toString(), new Exception(errMsg.toString()));
    }
    return status;
  }
Convert from {@link TSStatusCode} to {@link TSStatus} according to status code and status
message
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java