protected void handleError(final AccountState.Error error, final AuthenticationResponse response,
                               final PasswordPolicyContext configuration, final List<MessageDescriptor> messages) throws LoginException {

        LOGGER.debug("Handling LDAP account state error [{}]", error);
        if (error != null && errorMap.containsKey(error)) {
            throw errorMap.get(error);
        }
        LOGGER.debug("No LDAP error mapping defined for [{}]", error);
    }
Handle an account state error produced by ldaptive account state machinery.
<p>
Override this method to provide custom error handling.

@param error         Account state error.
@param response      Ldaptive authentication response.
@param configuration Password policy configuration.
@param messages      Container for messages produced by account state error handling.
@throws LoginException On errors that should be communicated as login exceptions.
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/authentication/support/DefaultLdapAccountStateHandler.java