memEx/lib/memex_web/views/error_view.ex
2022-11-26 20:38:31 -05:00

17 lines
456 B
Elixir

defmodule MemexWeb.ErrorView do
use MemexWeb, :view
import MemexWeb.Components.Topbar
alias MemexWeb.HomeLive
def template_not_found(error_path, _assigns) do
error_string =
case error_path do
"404.html" -> dgettext("errors", "not found")
"401.html" -> dgettext("errors", "unauthorized")
_ -> dgettext("errors", "internal server error")
end
render("error.html", %{error_string: error_string})
end
end