Skip to content

Commit

Permalink
MOSIP-31576 corrected error code
Browse files Browse the repository at this point in the history
Signed-off-by: kameshsr <[email protected]>
  • Loading branch information
kameshsr committed Oct 28, 2024
1 parent aa04be4 commit 1e0db7f
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ public void sendSmsNotification(String notificationMobileNo, String message)
restRequestDTO = restRequestFactory.buildRequest(RestServicesConstants.SMS_NOTIFICATION_SERVICE,
RestRequestFactory.createRequest(smsRequestDto), String.class);
restHelper.requestSync(restRequestDTO);
} catch (IDDataValidationException e) {
} catch (IDDataValidationException | RestServiceException e) {
logger.error(IdAuthCommonConstants.SESSION_ID, "Inside SMS Notification >>>>>", e.getErrorCode(), e.getErrorText());
throw new IdAuthenticationBusinessException(IdAuthenticationErrorConstants.DATA_VALIDATION_FAILED, e);
} catch (RestServiceException e) {
throw new RuntimeException(e);
}
}
}

/**
Expand All @@ -85,12 +83,10 @@ public void sendEmailNotification(String emailId, String mailSubject, String mai
restRequestDTO = restRequestFactory.buildRequest(RestServicesConstants.MAIL_NOTIFICATION_SERVICE,
mailRequestDto, String.class);
restHelper.requestSync(restRequestDTO);
} catch (IDDataValidationException e) {
} catch (IDDataValidationException | RestServiceException e) {
// FIXME change error code
logger.error(IdAuthCommonConstants.SESSION_ID, "Inside Mail Notification >>>>>", e.getErrorCode(), e.getErrorText());
throw new IdAuthenticationBusinessException(IdAuthenticationErrorConstants.DATA_VALIDATION_FAILED, e);
} catch (RestServiceException e) {
throw new RuntimeException(e);
}
}
}
}

0 comments on commit 1e0db7f

Please sign in to comment.