ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/docs unknown status

Otherwise an error like `{:signature, {:error, {:error, :not_found}}}`
ends up considered a success.

Cherry-picked-from: a299ddb10e
This commit is contained in:
Haelwenn (lanodan) Monnier 2024-04-17 07:37:41 +02:00 committed by Oneric
parent 0fee71f58f
commit 0c2f200b4d

View file

@ -14,7 +14,8 @@ def perform(%Job{args: %{"op" => "incoming_ap_doc", "params" => params}}) do
else
{:error, :origin_containment_failed} -> {:discard, :origin_containment_failed}
{:error, {:reject, reason}} -> {:discard, reason}
e -> e
{:error, _} = e -> e
e -> {:error, e}
end
end
end