Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors should be separately typed and documented #22

Open
typerandom opened this issue Sep 14, 2016 · 0 comments
Open

Errors should be separately typed and documented #22

typerandom opened this issue Sep 14, 2016 · 0 comments

Comments

@typerandom
Copy link
Contributor

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant