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