From: William Pitcock Date: Tue, 19 Feb 2019 21:31:27 +0000 (+0000) Subject: logging: improve visibility into ISE errors X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=8b08096436c38562fab287e0cd04a3e57dd92ab0;p=akkoma logging: improve visibility into ISE errors --- diff --git a/lib/pleroma/web/views/error_view.ex b/lib/pleroma/web/views/error_view.ex index 86a1744b7..aefc844fd 100644 --- a/lib/pleroma/web/views/error_view.ex +++ b/lib/pleroma/web/views/error_view.ex @@ -4,13 +4,16 @@ defmodule Pleroma.Web.ErrorView do use Pleroma.Web, :view + require Logger def render("404.json", _assigns) do %{errors: %{detail: "Page not found"}} end - def render("500.json", _assigns) do - %{errors: %{detail: "Internal server error"}} + def render("500.json", assigns) do + Logger.error("Internal server error: #{inspect(assigns[:reason])}") + + %{errors: %{detail: "Internal server error", reason: inspect(assigns[:reason])}} end # In case no render clause matches or no