From 94f4f035e37f287ff9c0971d1de090aed821cfe7 Mon Sep 17 00:00:00 2001 From: Neha Farheen Date: Wed, 7 Feb 2024 12:47:25 +0530 Subject: [PATCH] MOSIP-30687 changes done for ondemand Signed-off-by: Neha Farheen --- .../service/controller/AuthController.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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; }