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 7985dd48e67..cf9127b331c 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", "%s not available in database"), + ID_NOT_AVAILABLE("IDA-MLC-018", "Unable to identify the entered %s. Please try after few minutes"), 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"), @@ -66,8 +66,6 @@ public enum IdAuthenticationErrorConstants { 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"), - UNABLE_TO_IDENTIFY_ID("IDA-MLC-032", "Unable to identify the entered %s. Please try after few minutes"), - 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-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java b/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java index 6e3712eef9c..b0cb871ab94 100644 --- a/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java +++ b/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java @@ -162,11 +162,6 @@ public OtpResponseDTO generateOTP(@Valid @RequestBody OtpRequestDTO otpRequestDt if (IdAuthenticationErrorConstants.ID_NOT_AVAILABLE.getErrorCode().equals(e.getErrorCode())) { ondemandTemplateEventPublisher.notify(otpRequestDto, request.getHeader("signature"), partner, e, otpRequestDto.getMetadata()); - throw new IdAuthenticationBusinessException( - IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorCode(), - String.format(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorMessage(), - otpRequestDto.getIndividualIdType()), - e); } auditHelper.audit(AuditModules.OTP_REQUEST, AuditEvents.OTP_TRIGGER_REQUEST_RESPONSE , otpRequestDto.getTransactionID(), IdType.getIDTypeOrDefault(otpRequestDto.getIndividualIdType()), e); 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 4448597ac5a..43445882a42 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,13 +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.addInfo(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorCode(), - String.format(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorMessage(), - authrequestdto.getIndividualIdType())); - throw e; - } - auditHelper.auditExceptionForAuthRequestedModules(AuditEvents.AUTH_REQUEST_RESPONSE, authrequestdto, e); IdaRequestResponsConsumerUtil.setIdVersionToObjectWithMetadata(requestWithMetadata, e); e.putMetadata(IdAuthCommonConstants.TRANSACTION_ID, authrequestdto.getTransactionID()); diff --git a/authentication/authentication-service/src/main/java/io/mosip/authentication/service/kyc/controller/KycAuthController.java b/authentication/authentication-service/src/main/java/io/mosip/authentication/service/kyc/controller/KycAuthController.java index a8ffe0862f0..624883cc882 100644 --- a/authentication/authentication-service/src/main/java/io/mosip/authentication/service/kyc/controller/KycAuthController.java +++ b/authentication/authentication-service/src/main/java/io/mosip/authentication/service/kyc/controller/KycAuthController.java @@ -201,11 +201,6 @@ public EKycAuthResponseDTO processKyc(@Validated @RequestBody EkycAuthRequestDTO if (IdAuthenticationErrorConstants.ID_NOT_AVAILABLE.getErrorCode().equals(e.getErrorCode())) { ondemandTemplateEventPublisher.notify(ekycAuthRequestDTO, request.getHeader("signature"), partner, e, ekycAuthRequestDTO.getMetadata()); - throw new IdAuthenticationBusinessException( - IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorCode(), - String.format(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorMessage(), - ekycAuthRequestDTO.getIndividualIdType()), - e); } auditHelper.auditExceptionForAuthRequestedModules(AuditEvents.EKYC_REQUEST_RESPONSE, ekycAuthRequestDTO, e); IdaRequestResponsConsumerUtil.setIdVersionToObjectWithMetadata(requestWrapperWithMetadata, e); @@ -288,11 +283,6 @@ public KycAuthResponseDTO processKycAuth(@Validated @RequestBody KycAuthRequestD if (IdAuthenticationErrorConstants.ID_NOT_AVAILABLE.getErrorCode().equals(e.getErrorCode())) { ondemandTemplateEventPublisher.notify(authRequestDTO, request.getHeader("signature"), partner, e, authRequestDTO.getMetadata()); - throw new IdAuthenticationBusinessException( - IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorCode(), - String.format(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorMessage(), - authRequestDTO.getIndividualIdType()), - e); } auditHelper.auditExceptionForAuthRequestedModules(AuditEvents.KYC_REQUEST_RESPONSE, authRequestDTO, e); IdaRequestResponsConsumerUtil.setIdVersionToObjectWithMetadata(requestWrapperWithMetadata, e);