The error is returned because of an invalid LDAP request.
Usually LDAP results in such errors when the request includes names/objects from another domain.
For Password expiration Alerting the reason for the error can be invalid filtering by OU.
Password Expiration Alerting works with a single domain, and the domain name is determined by the Managed object name.
If you specify an OU from another domain in the OU filter, the above error will occur
In order to fix the error you need to reconfigure OU filtering to exclude objects from other domains, or just disable OU filtering.