Change validation error status codes to be more appropriate

This commit is contained in:
rinpatch 2019-05-21 17:12:38 +03:00
commit 0407ffe75f
2 changed files with 6 additions and 6 deletions

View file

@ -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} ->