(String) session.getAttribute("temp-domain-to-register"));
// here successKey can be null, in such cases services will directly go to suggest a name
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);