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 ea8f8e57f4d..4448597ac5a 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,12 +165,10 @@ 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()); - throw new IdAuthenticationBusinessException( - IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorCode(), - String.format( - IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorMessage(), - authrequestdto.getIndividualIdType()), - e); + e.addInfo(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorCode(), + String.format(IdAuthenticationErrorConstants.UNABLE_TO_IDENTIFY_ID.getErrorMessage(), + authrequestdto.getIndividualIdType())); + throw e; }