Merge branch 'develop' into 'develop'

LDAP Authenticator: Improve error reporting.

See merge request pleroma/pleroma!4171
This commit is contained in:
feld 2024-07-12 14:25:49 +00:00
commit 19eeea7c12
2 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
Improve error logging when LDAP authentication fails.

View File

@ -91,7 +91,8 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
end end
error -> error ->
error Logger.error("Could not bind LDAP user #{name}: #{inspect(error)}")
{:error, {:ldap_bind_error, error}}
end end
end end
@ -111,7 +112,8 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
try_register(name, attributes) try_register(name, attributes)
error -> error ->
error Logger.error("Couldn't register user because LDAP search failed: #{inspect(error)}")
{:error, {:ldap_search_error, error}}
end end
end end