Add some extra info around possible nils

This commit is contained in:
FloatingGhost 2022-12-09 23:45:51 +00:00
parent 2144ce5188
commit a1515f9a60
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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}

View file

@ -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
_ ->