Make the Publisher log error less noisy

This commit is contained in:
Mark Felder 2023-12-29 00:25:11 -05:00
parent 3954dfd4f1
commit 77949d4590
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Publisher errors will now emit logs indicating the inbox that was not available for delivery.

View File

@ -119,7 +119,8 @@ def publish_one(%{inbox: inbox, json: json, actor: %User{} = actor, id: id} = pa
else
{_post_result, response} = e ->
unless params[:unreachable_since], do: Instances.set_unreachable(inbox)
Logger.error("Failed to publish activity #{id} #{inspect(e)}")
Logger.metadata(activity: id, inbox: inbox, status: code)
Logger.error("Publisher failed to inbox #{inbox} with status #{code}")
{:error, response}
end
end