mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 04:53:06 +00:00
Merge branch 'bugfix/mrf-reject-logging' into 'develop'
Fix #783: Make MRF reject log as info level instead of error Closes #783 See merge request pleroma/pleroma!2758
This commit is contained in:
commit
b2ba70eec4
|
@ -124,6 +124,10 @@ def fetch_object_from_id!(id, options \\ []) do
|
|||
{:error, "Object has been deleted"} ->
|
||||
nil
|
||||
|
||||
{:reject, reason} ->
|
||||
Logger.info("Rejected #{id} while fetching: #{inspect(reason)}")
|
||||
nil
|
||||
|
||||
e ->
|
||||
Logger.error("Error while fetching #{id}: #{inspect(e)}")
|
||||
nil
|
||||
|
|
|
@ -1370,6 +1370,10 @@ def fetch_and_prepare_user_from_ap_id(ap_id) do
|
|||
Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}")
|
||||
{:error, e}
|
||||
|
||||
{:error, {:reject, reason} = e} ->
|
||||
Logger.info("Rejected user #{ap_id}: #{inspect(reason)}")
|
||||
{:error, e}
|
||||
|
||||
{:error, e} ->
|
||||
Logger.error("Could not decode user at fetch #{ap_id}, #{inspect(e)}")
|
||||
{:error, e}
|
||||
|
|
|
@ -178,7 +178,7 @@ def fix_in_reply_to(%{"inReplyTo" => in_reply_to} = object, options)
|
|||
|> Map.drop(["conversation"])
|
||||
else
|
||||
e ->
|
||||
Logger.error("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}")
|
||||
Logger.warn("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}")
|
||||
object
|
||||
end
|
||||
else
|
||||
|
|
|
@ -160,7 +160,7 @@ test "it does not crash if the object in inReplyTo can't be fetched" do
|
|||
|
||||
assert capture_log(fn ->
|
||||
{:ok, _returned_activity} = Transmogrifier.handle_incoming(data)
|
||||
end) =~ "[error] Couldn't fetch \"https://404.site/whatever\", error: nil"
|
||||
end) =~ "[warn] Couldn't fetch \"https://404.site/whatever\", error: nil"
|
||||
end
|
||||
|
||||
test "it works for incoming notices" do
|
||||
|
|
Loading…
Reference in a new issue