Add details of object in exception when AP object as no
actor/attributedTo Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -337,8 +337,9 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do
|
||||
message: "Object contains an actor object with invalid type: #{inspect(type)}"
|
||||
end
|
||||
|
||||
def get_actor(%{"actor" => nil, "attributedTo" => nil}) do
|
||||
raise ArgumentError, message: "Object contains both actor and attributedTo fields being null"
|
||||
def get_actor(%{"actor" => nil, "attributedTo" => nil} = object) do
|
||||
raise ArgumentError,
|
||||
message: "Object contains both actor and attributedTo fields being null: #{inspect(object)}"
|
||||
end
|
||||
|
||||
def get_actor(%{"actor" => _}) do
|
||||
|
||||
Reference in New Issue
Block a user