Transmogrifier.fix_in_reply_to/2: Use warn for non-fatal fail to get replied-to post

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-07-13 14:27:25 +02:00
parent f918b6f86d
commit 2aac92e9e0
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,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

View File

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