Handle errors when fetching actor pictures
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
f35db6540b
commit
5b85d96e06
|
@ -149,6 +149,8 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Actor do
|
|||
name <- name || Parser.get_filename_from_response(response_headers, url) || default_name,
|
||||
{:ok, file} <- Upload.store(%{body: body, name: name}) do
|
||||
Map.take(file, [:content_type, :name, :url, :size])
|
||||
else
|
||||
_ -> nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue