docs: public HFCAAffiliation getHFCAAffiliations(User registrar) throws AffiliationException, InvalidArgumentException {
          if (cryptoSuite == null) {
              throw new InvalidArgumentException("Crypto primitives not set.");
          }
  
          if (registrar == null) {
              throw new InvalidArgumentException("Registrar should be a valid member");
          }
  
          logger.debug(format("affiliations  url: %s, registrar: %s", url, registrar.getName()));
  
          try {
              JsonObject result = httpGet(HFCAAffiliation.HFCA_AFFILIATION, registrar);
              HFCAAffiliation affiliations = new HFCAAffiliation(result);
  
              logger.debug(format("affiliations  url: %s, registrar: %s done.", url, registrar));
              return affiliations;
          } catch (HTTPException e) {
              String msg = format("[HTTP Status Code: %d] - Error while getting all affiliations from url '%s': %s", e.getStatusCode(), url, e.getMessage());
              AffiliationException affiliationException = new AffiliationException(msg, e);
              logger.error(msg);
              throw affiliationException;
          } catch (Exception e) {
              String msg = format("Error while getting all affiliations from url '%s': %s", url, e.getMessage());
              AffiliationException affiliationException = new AffiliationException(msg, e);
              logger.error(msg);
              throw affiliationException;
          }
  
      }