From: FloatingGhost Date: Fri, 9 Dec 2022 23:45:51 +0000 (+0000) Subject: Add some extra info around possible nils X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a1515f9a606f6e5bdc2acb969cff2baad986efc4;p=akkoma Add some extra info around possible nils --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index c8262b37b..e32dd161e 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1922,7 +1922,7 @@ defmodule Pleroma.User do {:ok, user} e -> - Logger.error("Could not fetch user, #{inspect(e)}") + Logger.error("Could not fetch user #{ap_id}, #{inspect(e)}") {:error, :not_found} end end diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 521c8b852..3adb4ab54 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -1711,7 +1711,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do {:ok, maybe_update_follow_information(data)} else # If this has been deleted, only log a debug and not an error - {:error, {"Object has been deleted" = e, _, _}} -> + {:error, {"Object has been deleted", _, _} = e} -> Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}") {:error, e} diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index b9d853610..77015241b 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -136,7 +136,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do |> Map.drop(["conversation", "inReplyToAtomUri"]) else e -> - Logger.warn("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}") + Logger.warn("Couldn't fetch reply@#{inspect(in_reply_to_id)}, error: #{inspect(e)}") object end else @@ -159,7 +159,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do |> Map.put("quoteUri", quoted_object.data["id"]) else e -> - Logger.warn("Couldn't fetch #{inspect(quote_url)}, error: #{inspect(e)}") + Logger.warn("Couldn't fetch quote@#{inspect(quote_url)}, error: #{inspect(e)}") object end else @@ -833,7 +833,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do Map.put(data, "object", external_url) else {:fetch, e} -> - Logger.error("Couldn't fetch #{object} #{inspect(e)}") + Logger.error("Couldn't fetch fixed_object@#{object} #{inspect(e)}") data _ ->