diff --git a/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java b/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java index 689a87363ab..6399712619d 100644 --- a/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java +++ b/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java @@ -8073,7 +8073,9 @@ private UserStore getUserStoreInternal(String user) throws UserStoreException { } else if (SYSTEM_DOMAIN_NAME.equalsIgnoreCase(domain)) { userStore.setSystemStore(true); } else { - throw new UserStoreException("Invalid Domain Name"); + throw new UserStoreException(String.format( UserCoreErrorConstants.ErrorMessages + .ERROR_CODE_INVALID_DOMAIN_NAME.getMessage(), domain), + UserCoreErrorConstants.ErrorMessages.ERROR_CODE_INVALID_DOMAIN_NAME.getCode()); } }