logging: improve visibility into ISE errors
This commit is contained in:
parent
54f9e3d382
commit
8b08096436
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user