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:
commit
87b8ac3ce6
|
@ -0,0 +1 @@
|
||||||
|
ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}
|
|
@ -52,7 +52,8 @@ defp process_errors(errors) do
|
||||||
{:error, {:reject, reason}} -> {:cancel, reason}
|
{:error, {:reject, reason}} -> {:cancel, reason}
|
||||||
{:signature, false} -> {:cancel, :invalid_signature}
|
{:signature, false} -> {:cancel, :invalid_signature}
|
||||||
{:error, {:error, reason = "Object has been deleted"}} -> {:cancel, reason}
|
{:error, {:error, reason = "Object has been deleted"}} -> {:cancel, reason}
|
||||||
e -> e
|
{:error, _} = e -> e
|
||||||
|
e -> {:error, e}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue