From: Haelwenn (lanodan) Monnier Date: Fri, 1 Feb 2019 17:15:15 +0000 (+0100) Subject: MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=74c6119f2863be35312b9b6e11735b0c5ad4f845;p=akkoma MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list --- 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