cannery/lib/cannery_web/views/error_view.ex
shibao 632a9e1379
All checks were successful
continuous-integration/drone/push Build is passing
remove extraneous aliases
2023-02-26 14:22:54 -05:00

17 lines
474 B
Elixir

defmodule CanneryWeb.ErrorView do
use CanneryWeb, :view
import CanneryWeb.Components.Topbar
alias CanneryWeb.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")
_other_path -> dgettext("errors", "Internal Server Error")
end
render("error.html", %{error_string: error_string})
end
end