aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-02-01 17:27:50 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-02-01 17:27:50 +0000
commit389e6a878a7636c29f57cb4603abd33f4cca98d9 (patch)
tree24dc268056e3245a783e01e77cb57d664b8831b2
parent0a82a7e6d6f92bf3ca83cf039a445f7c8ce23336 (diff)
parent74c6119f2863be35312b9b6e11735b0c5ad4f845 (diff)
downloadpleroma-389e6a878a7636c29f57cb4603abd33f4cca98d9.tar.gz
Merge branch 'bugfix/get_list_return_404' into 'develop'
MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list See merge request pleroma/pleroma!755
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 491ed9dc5..a94eb5c73 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -905,7 +905,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
res = ListView.render("list.json", list: list)
json(conn, res)
else
- _e -> json(conn, "error")
+ _e ->
+ conn
+ |> put_status(404)
+ |> json(%{error: "Record not found"})
end
end