No 401 on failure
Makistos opened this issue · 1 comments
This is the same issue as the pinned one but as it's locked and it was requested a new ticket to be made instead here it is. I don't use the components mentioned (such as the REST helper) so I didn't spot any help from that issue.
I don't have a minimal example but my backend should be easy enough to set up & try. Here are the steps:
- Clone https://github.com/Makistos/suomisf.git.
- Create virtual environment & install requirements.
- Start with flask run.
- Send a request to an endpoint requiring a token: curl -X PUT http://127.0.0.1:5000/editions.
This will return 500.
I have a custom hook (jwt_admin_required) located in app/api_jwt.py but app never gets to it when this error happens. Login function is at the top of impl_users.py.
Ach. This is what happens when you have more than one issue at hand at the same time. I got a similar error and at some point it changed to a different internal error which I was able to figure out but I didn't notice this before I pasted the error.
Sorry for the inconvenience.