cosmetic/receiver_worker: reformat error cases

The next commit adds a multi-statement case
and then mix format will enforce this anyway
This commit is contained in:
Oneric 2024-11-23 22:44:37 +01:00
parent c5dbd17702
commit 5c8990eedd

View file

@ -12,11 +12,20 @@ def perform(%Job{args: %{"op" => "incoming_ap_doc", "params" => params}}) do
with {:ok, res} <- Federator.perform(:incoming_ap_doc, params) do
{:ok, res}
else
{:error, :origin_containment_failed} -> {:discard, :origin_containment_failed}
{:error, {:reject, reason}} -> {:discard, reason}
{:error, :already_present} -> {:discard, :already_present}
{:error, _} = e -> e
e -> {:error, e}
{:error, :origin_containment_failed} ->
{:discard, :origin_containment_failed}
{:error, {:reject, reason}} ->
{:discard, reason}
{:error, :already_present} ->
{:discard, :already_present}
{:error, _} = e ->
e
e ->
{:error, e}
end
end
end