X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fviews%2Ferror_view.ex;h=e68d55e0850e79c14f8f2200d5f19518b4c6862b;hb=ae3b0b4c0d67753696f46c5a01ecdecb10104a4e;hp=aefc844fd51db7b9e9b0f283ce8e32adc36a80ca;hpb=8b08096436c38562fab287e0cd04a3e57dd92ab0;p=akkoma
diff --git a/lib/pleroma/web/views/error_view.ex b/lib/pleroma/web/views/error_view.ex
index aefc844fd..e68d55e08 100644
--- 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
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# 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])}")
- %{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