diff --git a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonConstants.java b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonConstants.java index cd10ae5c..b372bd78 100644 --- a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonConstants.java +++ b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonConstants.java @@ -179,8 +179,7 @@ public enum ErrorMessages { ERROR_CODE_REGEX_VIOLATION("SUO-10001", "Regex validation error", "%s attribute value doesn't match with %s regex pattern"), ERROR_CODE_LENGTH_VIOLATION("SUO-10002", "Length validation error", - "%s attribute should be between %s and %s characters"), - ERROR_CODE_INVALID_SCENARIO("SUO-10003","Invalid scenario","Invalid scenario: '%s'"); + "%s attribute should be between %s and %s characters"); private final String code; private final String message; diff --git a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/Scenarios.java b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/Scenarios.java index a6ad9732..8ba5d2d5 100644 --- a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/Scenarios.java +++ b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/Scenarios.java @@ -48,7 +48,7 @@ public static Scenarios getScenario(String scenarioName) throws IdentitySCIMExce } } } - throw new IdentitySCIMException(SCIMCommonConstants.ErrorMessages.ERROR_CODE_INVALID_SCENARIO.getMessage()); + throw new IdentitySCIMException("Invalid scenario: " + scenarioName); } }