Open
Description
Errors are currently only identifiable as JwtError
or JwtParseError
. We should create specific errors for each error type so that they can be easily handled. Also, there's currently no documentation for the errors that the library can throw. We need to add that.
E.g. instead of returning:
new JwtParseError(properties.errors.SIGNATURE_ALGORITHM_MISMTACH, jwtString, header, body);
We should return:
new SignatureAlgorithmMismatchJwtParseError(jwtString, header, body);