Improve Remote Object Fetcher error handling, Oban
This commit is contained in:
parent
ee26d85578
commit
089fa4d146
5 changed files with 63 additions and 63 deletions
|
|
@ -13,17 +13,26 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do
|
|||
{:ok, _object} ->
|
||||
:ok
|
||||
|
||||
{:reject, reason} ->
|
||||
{:allowed_depth, false} ->
|
||||
{:cancel, :allowed_depth}
|
||||
|
||||
{:containment, reason} ->
|
||||
{:cancel, reason}
|
||||
|
||||
{:error, :forbidden} ->
|
||||
{:cancel, :forbidden}
|
||||
{:transmogrifier, reason} ->
|
||||
{:cancel, reason}
|
||||
|
||||
{:error, :not_found} ->
|
||||
{:cancel, :not_found}
|
||||
{:fetch, {:error, :forbidden = reason}} ->
|
||||
{:cancel, reason}
|
||||
|
||||
{:error, :allowed_depth} ->
|
||||
{:cancel, :allowed_depth}
|
||||
{:fetch, {:error, :not_found = reason}} ->
|
||||
{:cancel, reason}
|
||||
|
||||
{:fetch, {:error, {:content_type, _}} = reason} ->
|
||||
{:cancel, reason}
|
||||
|
||||
{:fetch, {:error, reason}} ->
|
||||
{:error, reason}
|
||||
|
||||
{:error, _} = e ->
|
||||
e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue