1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ErrorView do
9 def render("404.json", _assigns) do
10 %{errors: %{detail: "Page not found"}}
13 def render("500.json", assigns) do
14 Logger.error("Internal server error: #{inspect(assigns[:reason])}")
16 %{errors: %{detail: "Internal server error", reason: inspect(assigns[:reason])}}
19 # In case no render clause matches or no
20 # template is found, let's render it as 500
21 def template_not_found(_template, assigns) do
22 render("500.json", assigns)