Closed tekumara closed 7 months ago
JWTError is not exported and so vscode errors:
from jose import jwt ... try: token_header = jwt.get_unverified_header(token) except jwt.exceptions.JWTError: raise HTTPException(status_code=401, detail="Malformed auth token")
Likewise for jwt.ExpiredSignatureError and jwt.JWTClaimsError
jwt.ExpiredSignatureError
jwt.JWTClaimsError
Resolved by using
import jose.exceptions ... except jose.exceptions.JWTError: ....
JWTError is not exported and so vscode errors:
Likewise for
jwt.ExpiredSignatureError
andjwt.JWTClaimsError