logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 87b8ac3ce6bbbeb0ab65ca41e47f09f2d66f2f25
parent 71a03732327409fca07c83da35e372307223f515
Author: lain <lain@soykaf.club>
Date:   Fri, 19 Apr 2024 06:04:44 +0000

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

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

See merge request pleroma/pleroma!4100

Diffstat:

Achangelog.d/receiverworker-error-handling.fix2++
Mlib/pleroma/workers/receiver_worker.ex3++-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/changelog.d/receiverworker-error-handling.fix b/changelog.d/receiverworker-error-handling.fix @@ -0,0 +1 @@ +ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …} +\ No newline at end of file diff --git a/lib/pleroma/workers/receiver_worker.ex b/lib/pleroma/workers/receiver_worker.ex @@ -52,7 +52,8 @@ defmodule Pleroma.Workers.ReceiverWorker 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