mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-13 12:31:13 +00:00
Improved detecting unrecoverable errors for incoming federation jobs
This commit is contained in:
parent
b8503f1ad4
commit
d62a9afed3
2 changed files with 7 additions and 4 deletions
1
changelog.d/oban-cancel-receiverworker.change
Normal file
1
changelog.d/oban-cancel-receiverworker.change
Normal file
|
@ -0,0 +1 @@
|
|||
Improved detecting unrecoverable errors for incoming federation jobs
|
|
@ -47,11 +47,13 @@ defmodule Pleroma.Workers.ReceiverWorker do
|
|||
case errors do
|
||||
{:error, :origin_containment_failed} -> {:cancel, :origin_containment_failed}
|
||||
{:error, :already_present} -> {:cancel, :already_present}
|
||||
{:error, {:validate_object, reason}} -> {:cancel, reason}
|
||||
{:error, {:error, {:validate, reason}}} -> {:cancel, reason}
|
||||
{:error, {:reject, reason}} -> {:cancel, reason}
|
||||
{:error, {:validate_object, _} = reason} -> {:cancel, reason}
|
||||
{:error, {:validate, _} = reason} -> {:cancel, reason}
|
||||
{:error, {:reject, _} = reason} -> {:cancel, reason}
|
||||
{:signature, false} -> {:cancel, :invalid_signature}
|
||||
{:error, {:error, reason = "Object has been deleted"}} -> {:cancel, reason}
|
||||
{:error, "Object has been deleted"} = reason -> {:cancel, reason}
|
||||
{:error, {:side_effects, {:error, :no_object_actor}} = reason} -> {:cancel, reason}
|
||||
{:error, :not_found} = reason -> {:cancel, reason}
|
||||
{:error, _} = e -> e
|
||||
e -> {:error, e}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue