fastapi-jwt-auth
fastapi-jwt-auth copied to clipboard
500 error if token invalid instead of 422
I am seeing a 500 error when passing a wrong token instead of the usual 422. This happens with every version above 0.2.0.
Very basic example:
@auth_api_router_v1_0.get('/verify', status_code=status.HTTP_200_OK)
async def verify(authorize: AuthJWT = Depends()):
authorize.jwt_required()
return {'valid': True}
this is with a valid token, all good

and this if token is expired:
