aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-02-01 18:15:15 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-02-01 18:21:16 +0100
commit74c6119f2863be35312b9b6e11735b0c5ad4f845 (patch)
tree24dc268056e3245a783e01e77cb57d664b8831b2 /lib
parent0a82a7e6d6f92bf3ca83cf039a445f7c8ce23336 (diff)
downloadpleroma-74c6119f2863be35312b9b6e11735b0c5ad4f845.tar.gz
MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list
Diffstat (limited to 'lib')
-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