Files
firezone/elixir/apps/api/lib/api/error_view.ex
Brian Manifold 79c815fbbc feat(portal): Add REST API (#5579)
Why:

* In order to manage a large number of Firezone Sites, Resources,
Policies, etc... a REST API is needed as clicking through the UI is too
time consuming, as well as prone to error. By providing a REST API
Firezone customers will be able to manage things within their Firezone
accounts with code.
2024-07-20 04:20:43 +00:00

13 lines
371 B
Elixir

defmodule API.ErrorView do
def render("500.json", _assigns) do
%{error: %{reason: "internal_error"}}
end
# By default, Phoenix returns the status message from
# the template name. For example, "404.json" becomes
# "Not Found".
def render(template, _assigns) do
%{error: %{reason: Phoenix.Controller.status_message_from_template(template)}}
end
end