fix: as discussed changed to NOT_ACCEPTABLE rather than OK to prevent INTERNAL SERVER ERROR on validation

This commit is contained in:
farmersmurf 2019-09-12 08:21:39 +01:00 committed by Marek Posolda
parent ae74335760
commit 515727c944

View file

@ -585,7 +585,7 @@ public class AccountFormService extends AbstractSecuredLocalService {
ServicesLogger.LOGGER.failedToUpdatePassword(me);
setReferrerOnPage();
errorEvent.detail(Details.REASON, me.getMessage()).error(Errors.PASSWORD_REJECTED);
return account.setError(Response.Status.OK, me.getMessage(), me.getParameters()).createResponse(AccountPages.PASSWORD);
return account.setError(Response.Status.NOT_ACCEPTABLE, me.getMessage(), me.getParameters()).createResponse(AccountPages.PASSWORD);
} catch (Exception ape) {
ServicesLogger.LOGGER.failedToUpdatePassword(ape);
setReferrerOnPage();