summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2023-12-29 12:18:23 -0500
committerMark Felder <feld@feld.me>2023-12-29 13:04:06 -0500
commit833117f5738c286864d525aea9a87d1a7c193ff3 (patch)
tree8b802d2fbe5e581833144d40106397101c34679c /lib
parent4afe211e50466606c898e3fbd08b617413ef2e16 (diff)
downloadpleroma-833117f5738c286864d525aea9a87d1a7c193ff3.tar.gz
pleroma-833117f5738c286864d525aea9a87d1a7c193ff3.zip
Fix tests
Need to handle the edge case of no valid HTTP response which has no status code
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/publisher.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex
index e44e6eac1..cc47b3d27 100644
--- a/lib/pleroma/web/activity_pub/publisher.ex
+++ b/lib/pleroma/web/activity_pub/publisher.ex
@@ -128,6 +128,12 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
%{status: 410} -> {:discard, :not_found}
_ -> {:error, e}
end
+
+ e ->
+ unless params[:unreachable_since], do: Instances.set_unreachable(inbox)
+ Logger.metadata(activity: id, inbox: inbox)
+ Logger.error("Publisher failed to inbox #{inbox} #{inspect(e)}")
+ {:error, e}
end
end