String successKey = (String) session.getAttribute("validate-domain-success-key");
try {
TenantSelfRegistrationClient selfRegistrationClient =
new TenantSelfRegistrationClient(config, session);
return selfRegistrationClient.validateOrSuggestDomain(tempDomainToRegister, successKey);
} catch (Exception e) {
String msg = "Failed to validate or suggest a domain related to :" +
tempDomainToRegister + ".";
log.error(msg, e);
throw new UIException(msg, e);