use :discard instead of cancel

This commit is contained in:
FloatingGhost 2022-08-11 19:17:50 +01:00
parent ceeeefc707
commit d3b9cfb03f

View file

@ -12,8 +12,8 @@ defmodule Pleroma.Workers.ReceiverWorker do
with {:ok, res} <- Federator.perform(:incoming_ap_doc, params) do
{:ok, res}
else
{:error, :origin_containment_failed} -> {:cancel, :origin_containment_failed}
{:error, {:reject, reason}} -> {:cancel, reason}
{:error, :origin_containment_failed} -> {:discard, :origin_containment_failed}
{:error, {:reject, reason}} -> {:discard, reason}
e -> e
end
end