chore: return simplified error reason for less logging

This commit is contained in:
Zaiming (Stone) Shi 2023-09-29 09:48:15 +02:00
parent c2d750aa09
commit 6891234390
1 changed files with 6 additions and 4 deletions

View File

@ -135,11 +135,13 @@ login(
ensure_user_exists(Username); ensure_user_exists(Username);
{ok, #{result := 'invalidCredentials'} = Reason} -> {ok, #{result := 'invalidCredentials'} = Reason} ->
{error, Reason}; {error, Reason};
{error, _} = Error -> {error, _Reason} ->
Error %% All error reasons are logged in resource buffer worker
{error, ldap_bind_query_failed}
end; end;
{error, _} = Error -> {error, _Reason} ->
Error %% All error reasons are logged in resource buffer worker
{error, ldap_query_failed}
end. end.
ensure_user_exists(Username) -> ensure_user_exists(Username) ->