diff --git a/lib/mobilizon_web/controllers/fallback_controller.ex b/lib/mobilizon_web/controllers/fallback_controller.ex index c36a23fc9..6817b9cb2 100644 --- a/lib/mobilizon_web/controllers/fallback_controller.ex +++ b/lib/mobilizon_web/controllers/fallback_controller.ex @@ -9,18 +9,21 @@ defmodule MobilizonWeb.FallbackController do def call(conn, {:error, %Ecto.Changeset{} = changeset}) do conn |> put_status(:unprocessable_entity) - |> render(MobilizonWeb.ChangesetView, "error.json", changeset: changeset) + |> put_view(MobilizonWeb.ChangesetView) + |> render("error.json", changeset: changeset) end def call(conn, {:error, nil}) do conn |> put_status(:unprocessable_entity) - |> render(MobilizonWeb.ErrorView, "invalid_request.json") + |> put_view(MobilizonWeb.ErrorView) + |> render("invalid_request.json") end def call(conn, {:error, :not_found}) do conn |> put_status(:not_found) - |> render(MobilizonWeb.ErrorView, :"404") + |> put_view(MobilizonWeb.ErrorView) + |> render(:"404") end end