Handle 401s as I have observed it in the wild

This commit is contained in:
Mark Felder 2023-12-28 23:09:33 -05:00
parent a6fd251e44
commit aa070c7daf
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
Remote object fetch failures will prevent the object fetch job from retrying if the object request returns 403, 404, 410, or exceeds the maximum thread depth.
Remote object fetch failures will prevent the object fetch job from retrying if the object request returns 401, 403, 404, 410, or exceeds the maximum thread depth.

View file

@ -219,7 +219,7 @@ defmodule Pleroma.Object.Fetcher do
{:error, {:content_type, nil}}
end
{:ok, %{status: 403}} ->
{:ok, %{status: code}} when code in [401, 403] ->
{:error, :forbidden}
{:ok, %{status: code}} when code in [404, 410] ->