code: protected void handleError(final AccountState.Error error, final AuthenticationResponse response,
                                 final PasswordPolicyConfiguration configuration, final List<MessageDescriptor> messages) throws LoginException {
  
          LOGGER.debug("Handling LDAP account state error [{}]", error);
          if (errorMap.containsKey(error)) {
              throw errorMap.get(error);
          }
          LOGGER.debug("No LDAP error mapping defined for [{}]", error);
      }
docs: 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.