From b386888a0e8b13883f1457c2c62db8bd8b6744ce Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Thu, 25 Oct 2018 06:05:13 +0200
Subject: [PATCH] [Pleroma.Web.MastodonAPI.MastodonAPIController]: fallback for
 try_render/4

Better be sure than sorry
---
 lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 6 ++++++
 1 file changed, 6 insertions(+)

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 @@ def try_render(conn, renderer, target, params)
       res
     end
   end
+
+  def try_render(conn, _, _, _) do
+    conn
+    |> put_status(501)
+    |> json(%{error: "Can't display this activity"})
+  end
 end