mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-22 22:49:25 +00:00
Make token exchange return errors with 400 as status code
This commit is contained in:
parent
73904e8f78
commit
3607dc4558
|
@ -71,7 +71,9 @@ defmodule Pleroma.Web.OAuth.OAuthController do
|
|||
|
||||
json(conn, response)
|
||||
else
|
||||
_error -> json(conn, %{error: "Invalid credentials"})
|
||||
_error ->
|
||||
put_status(conn, 400)
|
||||
|> json(%{error: "Invalid credentials"})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -96,7 +98,9 @@ defmodule Pleroma.Web.OAuth.OAuthController do
|
|||
|
||||
json(conn, response)
|
||||
else
|
||||
_error -> json(conn, %{error: "Invalid credentials"})
|
||||
_error ->
|
||||
put_status(conn, 400)
|
||||
|> json(%{error: "Invalid credentials"})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue