PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
22.65k stars 1k forks source link

Return 401 for JWT with invalid role #3601

Open wolfgangwalther opened 1 week ago

wolfgangwalther commented 1 week ago

A JWT with a role that doesn't exist on the server currently returns a 400 status code. Shouldn't this return a 401 as well, just like all the other JWT errors?

https://github.com/PostgREST/postgrest/blob/465170c7d6c51dace3faf68fbb4040353d5571c0/test/io/test_io.py#L84-L88