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

[Feature Request] Please document error codes #216

Open
lonix1 opened this issue Feb 11, 2019 · 2 comments
Open

[Feature Request] Please document error codes #216

lonix1 opened this issue Feb 11, 2019 · 2 comments

Comments

@lonix1
Copy link

lonix1 commented Feb 11, 2019

Would be very helpful for the docs to clearly document the various types of error codes.

I had all sorts of problems because I didn't know which errors were coming from this library, and what they meant.

I went through the code and found these:

  • 'credentials_bad_scheme'
  • 'credentials_bad_format'
  • 'credentials_required'
  • 'invalid_token' x2
  • 'revoked_token'

Note that the 'invalid_token' error code is used in two cases: 1) because of a failed decode and 2) because of a failed verify. There should be a distinction between them, but that is a separate issue (perhaps we should use different codes, or different messages).

@lonix1 lonix1 changed the title [Feature Request] Please document the various errors [Feature Request] Please document error codes Feb 11, 2019
@krumware
Copy link

+1 to this. In order to provide proper logging and feedback related these errors, it would be great to know what to expect.

I also went through the source, and it looks like those are the full collection of errors for this library.
Since it uses node-jsonwebtoken under the hood, here are some additional codes:
https://github.com/auth0/node-jsonwebtoken#errors--codes

@gannear
Copy link

gannear commented Sep 7, 2020

Test comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants