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:
parent
c5dbd17702
commit
5c8990eedd
1 changed files with 14 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue