Change validation error status codes to be more appropriate
This commit is contained in:
parent
ee68244141
commit
0407ffe75f
2 changed files with 6 additions and 6 deletions
|
|
@ -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} ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue