Merge branch 'receiverworker-error-handling' into 'develop'

ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}

See merge request pleroma/pleroma!4100
This commit is contained in:
lain 2024-04-19 06:04:44 +00:00
commit 87b8ac3ce6
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}

View File

@ -52,7 +52,8 @@ defp process_errors(errors) do
{:error, {:reject, reason}} -> {:cancel, reason}
{:signature, false} -> {:cancel, :invalid_signature}
{:error, {:error, reason = "Object has been deleted"}} -> {:cancel, reason}
e -> e
{:error, _} = e -> e
e -> {:error, e}
end
end
end