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);
{ok, #{result := 'invalidCredentials'} = Reason} ->
{error, Reason};
{error, _} = Error ->
Error
{error, _Reason} ->
%% All error reasons are logged in resource buffer worker
{error, ldap_bind_query_failed}
end;
{error, _} = Error ->
Error
{error, _Reason} ->
%% All error reasons are logged in resource buffer worker
{error, ldap_query_failed}
end.
ensure_user_exists(Username) ->