projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix digest mix task on OTP releases
[akkoma]
/
lib
/
pleroma
/
web
/
views
/
error_view.ex
diff --git
a/lib/pleroma/web/views/error_view.ex
b/lib/pleroma/web/views/error_view.ex
index aefc844fd51db7b9e9b0f283ce8e32adc36a80ca..e68d55e0850e79c14f8f2200d5f19518b4c6862b 100644
(file)
--- a/
lib/pleroma/web/views/error_view.ex
+++ b/
lib/pleroma/web/views/error_view.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ErrorView do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ErrorView do
@@
-13,7
+13,11
@@
defmodule Pleroma.Web.ErrorView do
def render("500.json", assigns) do
Logger.error("Internal server error: #{inspect(assigns[:reason])}")
def render("500.json", assigns) do
Logger.error("Internal server error: #{inspect(assigns[:reason])}")
- %{errors: %{detail: "Internal server error", reason: inspect(assigns[:reason])}}
+ if Pleroma.Config.get(:env) != :prod do
+ %{errors: %{detail: "Internal server error", reason: inspect(assigns[:reason])}}
+ else
+ %{errors: %{detail: "Internal server error"}}
+ end
end
# In case no render clause matches or no
end
# In case no render clause matches or no