Skip to content
Snippets Groups Projects
Commit 3607dc45 authored by Dee's avatar Dee
Browse files

Make token exchange return errors with 400 as status code

parent 73904e8f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment