[api] Fix typo that fails retry for connection when using LDAP auth.