mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 18:17:55 +00:00
Don't die on fetching problems.
This commit is contained in:
parent
3ca853fb61
commit
f445a1b376
|
@ -300,6 +300,7 @@ defmodule Pleroma.Web.OStatus do
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_activity_from_url(url) do
|
def fetch_activity_from_url(url) do
|
||||||
|
try do
|
||||||
with {:ok, activities} when length(activities) > 0 <- fetch_activity_from_atom_url(url) do
|
with {:ok, activities} when length(activities) > 0 <- fetch_activity_from_atom_url(url) do
|
||||||
{:ok, activities}
|
{:ok, activities}
|
||||||
else
|
else
|
||||||
|
@ -307,5 +308,10 @@ defmodule Pleroma.Web.OStatus do
|
||||||
{:ok, activities}
|
{:ok, activities}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
e ->
|
||||||
|
Logger.debug("Couldn't get #{url}: #{inspect(e)}")
|
||||||
|
{:error, "Couldn't get #{url}: #{inspect(e)}"}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue