From: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 25 Oct 2018 04:05:13 +0000 (+0200)
Subject: [Pleroma.Web.MastodonAPI.MastodonAPIController]: fallback for try_render/4
X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b386888a0e8b13883f1457c2c62db8bd8b6744ce;p=akkoma

[Pleroma.Web.MastodonAPI.MastodonAPIController]: fallback for try_render/4

Better be sure than sorry
---

diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 77146d780..751698ca8 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -1215,4 +1215,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
       res
     end
   end
+
+  def try_render(conn, _, _, _) do
+    conn
+    |> put_status(501)
+    |> json(%{error: "Can't display this activity"})
+  end
 end