Closed ashokdelphia closed 4 years ago
@ashokdelphia Great! Are you done with this PR or do you have more changes in mind? If you're done, could you please add a changelog so I can merge it?
That’s all I have for this one. I’ll add a changelog this morning.
@fitodic: Thank you. Much appreciated!
There are various subclasses of InvalidTokenError that end up bubbling up as unhandled errors in the old code, including InvalidAlgorithmError.
This is very similar to the fix in #72, but for the check_payload version of the similar logic.
Again, I've kept the explicit handling of DecodeError and Expired Signature, which are also children of InvalidTokenError, so that we don't change the behaviour for previously handled errors.
I think it would be good to unify the logic for these at some point, but for now I'm just handling the same errors in both places.