mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-13 12:31:13 +00:00
LDAP Authenticator: Improve error reporting.
This commit is contained in:
parent
ef2ada59e0
commit
03c3c58d74
2 changed files with 5 additions and 2 deletions
1
changelog.d/ldap-error-logging.change
Normal file
1
changelog.d/ldap-error-logging.change
Normal file
|
@ -0,0 +1 @@
|
|||
Improve error logging when LDAP authentication fails.
|
|
@ -91,7 +91,8 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
|
|||
end
|
||||
|
||||
error ->
|
||||
error
|
||||
Logger.error("Could not bind LDAP user #{name}: #{inspect(error)}")
|
||||
{:error, {:ldap_bind_error, error}}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +112,8 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
|
|||
try_register(name, attributes)
|
||||
|
||||
error ->
|
||||
error
|
||||
Logger.error("Couldn't register user because LDAP search failed: #{inspect(error)}")
|
||||
{:error, {:ldap_search_error, error}}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue