diff --git a/components/org.wso2.carbon.identity.api.user.recovery/src/main/java/org/wso2/carbon/identity/recovery/endpoint/impl/RecoverUsernameApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.recovery/src/main/java/org/wso2/carbon/identity/recovery/endpoint/impl/RecoverUsernameApiServiceImpl.java index 87710730c3..c7fa0f9631 100644 --- a/components/org.wso2.carbon.identity.api.user.recovery/src/main/java/org/wso2/carbon/identity/recovery/endpoint/impl/RecoverUsernameApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.recovery/src/main/java/org/wso2/carbon/identity/recovery/endpoint/impl/RecoverUsernameApiServiceImpl.java @@ -48,8 +48,10 @@ public Response recoverUsernamePost(List claim, String tenantDomai } catch (IdentityRecoveryException e) { if (e.getCause() != null && StringUtils.equals(Constants.ERROR_MESSAGE_EMAIL_NOT_FOUND, e.getCause().getMessage())) { - LOG.error(e.getCause().getMessage(), e.getCause()); - RecoveryUtil.handleBadRequest(e.getCause().getMessage(), Constants.ERROR_CODE_EMAIL_NOT_FOUND); + if (LOG.isDebugEnabled()) { + LOG.debug(e.getCause().getMessage()); + } + return Response.ok().build(); } RecoveryUtil.handleInternalServerError(Constants.SERVER_ERROR, e.getErrorCode(), LOG, e); } catch (Throwable throwable) {