Stop oban from retrying if validating errors occur when processing incoming data

This commit is contained in:
tusooa 2023-03-01 00:40:44 -05:00
commit 1babd0798f
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 30 additions and 0 deletions

View file

@ -13,6 +13,9 @@ defmodule Pleroma.Workers.ReceiverWorker do
{:ok, res}
else
{: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}
e -> e
end