When sending a POST call to /auth, an errored header with junky fields, triggers a 500 server error. I assume that it should send back a response with the error code or some exception handling message.
To replicate this, type some junk into the key and value, then make a call. If you get the error I’m seeing, on a dev instance, the error handler spits out:
AttributeError: 'NoneType' object has no attribute 'get'
Then the callback ends with:
There’s a long list of errors, which end with:
File "D:_xampp\htdocs_github\spear_api\flask\venv\lib\site-packages\flask_jwt__init__.py", line 115, in _default_auth_request_handler
username = data.get(current_app.config.get('JWT_AUTH_USERNAME_KEY'), None)
When sending a POST call to /auth, an errored header with junky fields, triggers a 500 server error. I assume that it should send back a response with the error code or some exception handling message.
To replicate this, type some junk into the key and value, then make a call. If you get the error I’m seeing, on a dev instance, the error handler spits out:
AttributeError: 'NoneType' object has no attribute 'get' Then the callback ends with: There’s a long list of errors, which end with: File "D:_xampp\htdocs_github\spear_api\flask\venv\lib\site-packages\flask_jwt__init__.py", line 115, in _default_auth_request_handler username = data.get(current_app.config.get('JWT_AUTH_USERNAME_KEY'), None)
It looks like this is related to an old issue, so perhaps this has reemerged: https://github.com/mattupstate/flask-jwt/issues/80