diff --git a/lib/pleroma/web/web_finger/web_finger_controller.ex b/lib/pleroma/web/web_finger/web_finger_controller.ex index d8959a96f..d4536fc46 100644 --- a/lib/pleroma/web/web_finger/web_finger_controller.ex +++ b/lib/pleroma/web/web_finger/web_finger_controller.ex @@ -12,10 +12,12 @@ def host_meta(conn, _params) do end def webfinger(conn, %{"resource" => resource}) do - {:ok, response} = WebFinger.webfinger(resource) - - conn - |> put_resp_content_type("application/xrd+xml") - |> send_resp(200, response) + with {:ok, response} <- WebFinger.webfinger(resource) do + conn + |> put_resp_content_type("application/xrd+xml") + |> send_resp(200, response) + else + _e -> send_resp(conn, 404, "Couldn't find user") + end end end