I'd like to be able to catch ExpiredSignatureError, DecodeError and other specific exceptions and do something meaningful with them, but they aren't exposed for import. I can only import JWTError, but I see more specific exceptions 'escaping' (eg: DecodeError).
Further on an expired signature for example, internal to flask-jwt a ExpiredSignatureError is generated, but is later exposed externally as a JWTError with only a description that the token has expired which makes exception handling awkward as I have to inspect the text of the description rather than just catching on the exception type itself.
Can these errors be exposed externally so they can be imported and used externally?
I'd like to be able to catch
ExpiredSignatureError
,DecodeError
and other specific exceptions and do something meaningful with them, but they aren't exposed for import. I can only importJWTError
, but I see more specific exceptions 'escaping' (eg:DecodeError
).Further on an expired signature for example, internal to flask-jwt a
ExpiredSignatureError
is generated, but is later exposed externally as aJWTError
with only a description that the token has expired which makes exception handling awkward as I have to inspect the text of the description rather than just catching on the exception type itself.Can these errors be exposed externally so they can be imported and used externally?
Thanks!