Handle actor fetch issues better

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-04-23 09:25:57 +02:00
parent 87aeac6aea
commit eaadf261ac
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -119,6 +119,10 @@ defmodule Mobilizon.Federation.ActivityPub.Fetcher do
Logger.info("Response HTTP 410") Logger.info("Response HTTP 410")
{:error, :actor_deleted} {:error, :actor_deleted}
{:ok, %Tesla.Env{}} ->
Logger.info("Non 200 HTTP Code")
{:error, :http_error}
{:error, e} -> {:error, e} ->
Logger.warn("Could not decode actor at fetch #{url}, #{inspect(e)}") Logger.warn("Could not decode actor at fetch #{url}, #{inspect(e)}")
{:error, e} {:error, e}