X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fviews%2Ferror_view.ex;h=c9715dc4bbc095533ba7ffb458b841e313c6011b;hb=c45b3bde949bbbd6b8d6de30022c1d1e5b99dc44;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..c9715dc4b 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-2021 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