Commit 8b080964 authored by kaniini's avatar kaniini

logging: improve visibility into ISE errors

parent 54f9e3d3
...@@ -4,13 +4,16 @@ ...@@ -4,13 +4,16 @@
defmodule Pleroma.Web.ErrorView do defmodule Pleroma.Web.ErrorView do
use Pleroma.Web, :view use Pleroma.Web, :view
require Logger
def render("404.json", _assigns) do def render("404.json", _assigns) do
%{errors: %{detail: "Page not found"}} %{errors: %{detail: "Page not found"}}
end end
def render("500.json", _assigns) do def render("500.json", assigns) do
%{errors: %{detail: "Internal server error"}} Logger.error("Internal server error: #{inspect(assigns[:reason])}")
%{errors: %{detail: "Internal server error", reason: inspect(assigns[:reason])}}
end end
# In case no render clause matches or no # In case no render clause matches or no
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment