Don't log when users or objects are deleted.

This commit is contained in:
Phil Hagelberg 2019-12-13 11:14:11 -08:00
parent 8ad6d2784c
commit 02c3031e99
2 changed files with 7 additions and 0 deletions

View File

@ -117,6 +117,9 @@ def fetch_object_from_id!(id, options \\ []) do
{:error, %Tesla.Mock.Error{}} -> {:error, %Tesla.Mock.Error{}} ->
nil nil
{:error, "Object has been deleted"} ->
nil
e -> e ->
Logger.error("Error while fetching #{id}: #{inspect(e)}") Logger.error("Error while fetching #{id}: #{inspect(e)}")
nil nil

View File

@ -1377,6 +1377,10 @@ def fetch_and_prepare_user_from_ap_id(ap_id) do
data <- maybe_update_follow_information(data) do data <- maybe_update_follow_information(data) do
{:ok, data} {:ok, data}
else else
{:error, "Object has been deleted"} = e ->
Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}")
{:error, e}
e -> 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}