diff --git a/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthCommonConstants.java b/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthCommonConstants.java index 5075a446a6f..e5e0ab1940a 100644 --- a/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthCommonConstants.java +++ b/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthCommonConstants.java @@ -464,6 +464,8 @@ public final class IdAuthCommonConstants { public static final String POLICY_DATA = "policy_data"; public static final String MISP_LIC_DATA = "misp_lic_data"; + + public static final String UNABLE_TO_IDENTIFY_ID = "Unable to identify the entered %s. Please try after few minutes"; private IdAuthCommonConstants() { } diff --git a/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthenticationErrorConstants.java b/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthenticationErrorConstants.java index cf9127b331c..02abf98fbb7 100644 --- a/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthenticationErrorConstants.java +++ b/authentication/authentication-core/src/main/java/io/mosip/authentication/core/constant/IdAuthenticationErrorConstants.java @@ -52,7 +52,7 @@ public enum IdAuthenticationErrorConstants { IDENTITYTYPE_NOT_ALLOWED("IDA-MLC-015", "Identity Type - %s not configured for the country"), INVALID_TXNID_BIO("IDA-MLC-016", "Transaction ID parameters in the request does not match"), INVALID_USERID( "IDA-MLC-017","Invalid UserID"), - ID_NOT_AVAILABLE("IDA-MLC-018", "Unable to identify the entered %s. Please try after few minutes"), + ID_NOT_AVAILABLE("IDA-MLC-018", "%s not available in database"), AUTH_TYPE_LOCKED("IDA-MLC-019", "%s Auth Type is Locked for the UIN"), FAILED_TO_ENCRYPT("IDA-MLC-020", "Unable to encrypt data"), FAILED_TO_FETCH_KEY("IDA-MLC-021", "Failed to fetch key from HSM"), @@ -65,7 +65,7 @@ public enum IdAuthenticationErrorConstants { "Please capture biometrics within %s seconds of previous biometric capture"), INVALID_BIO_DIGITALID_TIMESTAMP("IDA-MLC-031", "DigitalId of Biometrics not captured within %s seconds of previous biometrics", "Please capture DigitalId of biometrics within %s seconds of previous biometric capture"), - + DEMOGRAPHIC_DATA_MISMATCH_LANG("IDA-DEA-001", "Demographic data %s in %s did not match", "Please re-enter your %s in %s"), DEMO_DATA_MISMATCH("IDA-DEA-001", "Demographic data %s did not match", "Please re-enter your %s"), diff --git a/authentication/authentication-service/src/main/java/io/mosip/authentication/service/controller/AuthController.java b/authentication/authentication-service/src/main/java/io/mosip/authentication/service/controller/AuthController.java index 43445882a42..38ed5926fcc 100644 --- a/authentication/authentication-service/src/main/java/io/mosip/authentication/service/controller/AuthController.java +++ b/authentication/authentication-service/src/main/java/io/mosip/authentication/service/controller/AuthController.java @@ -165,6 +165,7 @@ public AuthResponseDTO authenticateIndividual(@Validated @RequestBody AuthReques if (IdAuthenticationErrorConstants.ID_NOT_AVAILABLE.getErrorCode().equals(e.getErrorCode())) { ondemandTemplateEventPublisher.notify(authrequestdto, request.getHeader("signature"), partner, e, authrequestdto.getMetadata()); + e.getErrorTexts().add(0, String.format(IdAuthCommonConstants.UNABLE_TO_IDENTIFY_ID, authrequestdto.getIndividualIdType())); } auditHelper.auditExceptionForAuthRequestedModules(AuditEvents.AUTH_REQUEST_RESPONSE, authrequestdto, e); IdaRequestResponsConsumerUtil.setIdVersionToObjectWithMetadata(requestWithMetadata, e);