mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
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.
13 lines
371 B
Elixir
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
|