Use Logger.info for {:reject, reason}

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-07-13 14:23:03 +02:00
parent 2aac92e9e0
commit ce243b107f
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
2 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,10 @@ def fetch_object_from_id!(id, options \\ []) do
{:error, "Object has been deleted"} -> {:error, "Object has been deleted"} ->
nil nil
{:reject, reason} ->
Logger.info("Rejected #{id} while fetching: #{inspect(reason)}")
nil
e -> e ->
Logger.error("Error while fetching #{id}: #{inspect(e)}") Logger.error("Error while fetching #{id}: #{inspect(e)}")
nil nil

View File

@ -1370,6 +1370,10 @@ def fetch_and_prepare_user_from_ap_id(ap_id) do
Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}") Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}")
{:error, e} {:error, e}
{:error, {:reject, reason} = e} ->
Logger.info("Rejected user #{ap_id}: #{inspect(reason)}")
{:error, e}
{:error, e} -> {:error, e} ->
Logger.error("Could not decode user at fetch #{ap_id}, #{inspect(e)}") Logger.error("Could not decode user at fetch #{ap_id}, #{inspect(e)}")
{:error, e} {:error, e}