From 02c3031e9985892bb698436105b93ac5481b6984 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Fri, 13 Dec 2019 11:14:11 -0800 Subject: [PATCH] Don't log when users or objects are deleted. --- lib/pleroma/object/fetcher.ex | 3 +++ lib/pleroma/web/activity_pub/activity_pub.ex | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex index 4d71c91a8..9bc7b0210 100644 --- a/lib/pleroma/object/fetcher.ex +++ b/lib/pleroma/object/fetcher.ex @@ -117,6 +117,9 @@ defmodule Pleroma.Object.Fetcher do {:error, %Tesla.Mock.Error{}} -> nil + {:error, "Object has been deleted"} -> + nil + e -> Logger.error("Error while fetching #{id}: #{inspect(e)}") nil diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 16e6b0057..ac76eb7d8 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -1377,6 +1377,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do data <- maybe_update_follow_information(data) do {:ok, data} else + {:error, "Object has been deleted"} = e -> + Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}") + {:error, e} + e -> Logger.error("Could not decode user at fetch #{ap_id}, #{inspect(e)}") {:error, e} -- 2.45.2