diff options
Diffstat (limited to 'lib/pleroma/web/activity_pub')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub_controller.ex | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex index a6a9b99ef..ee5d319a7 100644 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -27,9 +27,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do |> json(ObjectView.render("object.json", %{object: object})) else {:public?, false} -> - conn - |> put_status(404) - |> json("Not found") + {:error, :not_found} end end @@ -107,6 +105,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do json(conn, "ok") end + def errors(conn, {:error, :not_found}) do + conn + |> put_status(404) + |> json("Not found") + end + def errors(conn, _e) do conn |> put_status(500) |