this repo has no description
1defmodule EslHnWeb.Error.JSON do 2 @moduledoc """ 3 This module is invoked by your endpoint in case of errors on JSON requests. 4 5 See config/config.exs. 6 """ 7 8 # If you want to customize a particular status code, 9 # you may add your own clauses, such as: 10 # 11 # def render("500.json", _assigns) do 12 # %{errors: %{detail: "Internal Server Error"}} 13 # end 14 15 # By default, Phoenix returns the status message from 16 # the template name. For example, "404.json" becomes 17 # "Not Found". 18 def render(template, _assigns) do 19 %{ 20 errors: %{ 21 detail: Phoenix.Controller.status_message_from_template(template) 22 } 23 } 24 end 25end