Current section

Files

Jump to
livebook lib livebook_web controllers error_json.ex
Raw

lib/livebook_web/controllers/error_json.ex

defmodule LivebookWeb.ErrorJSON do
# By default, Phoenix returns the status message from
# the template name. For example, "404.json" becomes
# "Not Found".
def render(template, _assigns) do
%{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}}
end
end