You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To recreate:
Create a token with malformed payload ( i e add some random letters in payload part).
Run token throught verify() method.
Error object now is of type "SyntaxError" with message "Unexpected end of JSON input".
Expected result:
Error object of name "JsonWebTokenError" with message "jwt malformed"
Actual result:
Error object of name "SyntaxError" with message "Unexpected end of JSON input"
Proposed actions:
Use message "jwt malformed" on "JsonWebTokenError" when JSON is malformed.
Add new Error type "SyntaxError" with corresponding message on errors thrown on other reasons not included in documentation expected error message list.