mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 19:29:11 +00:00
MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list
This commit is contained in:
parent
0a82a7e6d6
commit
74c6119f28
1 changed files with 4 additions and 1 deletions
|
@ -905,7 +905,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
res = ListView.render("list.json", list: list)
|
res = ListView.render("list.json", list: list)
|
||||||
json(conn, res)
|
json(conn, res)
|
||||||
else
|
else
|
||||||
_e -> json(conn, "error")
|
_e ->
|
||||||
|
conn
|
||||||
|
|> put_status(404)
|
||||||
|
|> json(%{error: "Record not found"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue