Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise jws.decode error to avoid confusion with "invalid token" error (#…
…294) * Corrected indistinguishable error messages jws.decode() never throws an error. At least, in its current version. However, if it were to throw an exception, the diagnostics would be indistinguishable from a soft failure to decode a token. I had an extra trailing space on my JWT and it took me some additional debugging work to trace the actual root cause because the error message was not distinct. * Allowed an exception from inside of jws.decode to be handled by the caller. Currently, jws.decode never throws an exception. The change is made per discsussion in the original PR * Added a test case and proper forwarding of the possible exception thrown from jws.decode * Typo correction
- Loading branch information