Handle HTTP "410 Gone" response

This commit is contained in:
Egor Kislitsyn 2019-06-13 16:34:03 +07:00
commit afae3ada22
2 changed files with 22 additions and 5 deletions

View file

@ -85,6 +85,9 @@ defmodule Pleroma.Object.Fetcher do
:ok <- Containment.contain_origin_from_id(id, data) do
{:ok, data}
else
{:ok, %{status: 410}} ->
{:error, "Object has been deleted"}
e ->
{:error, e}
end