error codes
This commit is contained in:
parent
9a58a57120
commit
e420e51b7d
3 changed files with 10 additions and 3 deletions
1
lp/lib/lp_web/templates/error/404.html.eex
Normal file
1
lp/lib/lp_web/templates/error/404.html.eex
Normal file
|
|
@ -0,0 +1 @@
|
|||
<h1>404</h1>
|
||||
2
lp/lib/lp_web/templates/error/500.html.eex
Normal file
2
lp/lib/lp_web/templates/error/500.html.eex
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>500</h1>
|
||||
<p>There was an error. Sadly.</p>
|
||||
|
|
@ -3,9 +3,13 @@ defmodule LpWeb.ErrorView do
|
|||
|
||||
# If you want to customize a particular status code
|
||||
# for a certain format, you may uncomment below.
|
||||
# def render("500.html", _assigns) do
|
||||
# "Internal Server Error"
|
||||
# end
|
||||
def render("404.html", _assigns) do
|
||||
render("404.html", %{})
|
||||
end
|
||||
def render("500.html", _assigns) do
|
||||
render("500.html", %{})
|
||||
# "Internal Server Error"
|
||||
end
|
||||
|
||||
# By default, Phoenix returns the status message from
|
||||
# the template name. For example, "404.html" becomes
|
||||
|
|
|
|||
Reference in a new issue