aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-05-21 17:12:38 +0300
committerrinpatch <rinpatch@sdf.org>2019-05-21 17:12:38 +0300
commit0407ffe75f7e91db240d491492eadf1385b1726b (patch)
treec7614cac74c73291ce52fb888711758f9451d64c /lib
parentee682441415d7abe4acb2643e1d76fe8d78e80c1 (diff)
downloadpleroma-0407ffe75f7e91db240d491492eadf1385b1726b.tar.gz
Change validation error status codes to be more appropriate
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index e2cab86f1..aef2abf0b 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -488,12 +488,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
case get_cached_status_or_post(conn, params) do
{:ignore, message} ->
conn
- |> put_status(401)
+ |> put_status(422)
|> json(%{error: message})
{:error, message} ->
conn
- |> put_status(401)
+ |> put_status(422)
|> json(%{error: message})
{_, activity} ->