protected Event getErrorEvent(final RequestContext ctx, final String code, final String message, final Object... params) {
        WebUtils.addErrorMessageToContext(ctx, code, message, params);
        return error();
    }
This is {@link PasswordChangeAction}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/actions/PasswordChangeAction.java