Files
firezone/elixir/apps/web/lib/web/live_errors.ex
Andrew Dryga 1078c292d3 fix(portal): Ship hotfixes for various crash reports discovered in logs (#4538)
I'll merge and push this right away to prevent users from hitting edge
cases and our monitoring from triggering alerts.
2024-04-08 02:20:26 -06:00

22 lines
538 B
Elixir

defmodule Web.LiveErrors do
defmodule NotFoundError do
defexception message: "Not Found"
defimpl Plug.Exception do
def status(_exception), do: 404
def actions(_exception), do: []
end
end
# this is not a styled error because only security scanners that
# try to manipulate the request will see it
defmodule InvalidParamsError do
defexception message: "Unprocessable Entity"
defimpl Plug.Exception do
def status(_exception), do: 422
def actions(_exception), do: []
end
end
end