logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 389e6a878a7636c29f57cb4603abd33f4cca98d9
parent: 0a82a7e6d6f92bf3ca83cf039a445f7c8ce23336
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date:   Fri,  1 Feb 2019 17:27:50 +0000

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

Diffstat:

Mlib/pleroma/web/mastodon_api/mastodon_api_controller.ex5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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