Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

can't verify token. it will show 500 error code.

Open
#853 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
express, javascript, node.js

Research direction

Start by reproducing jwt.verify(token, 'Refresh_Access_Secret') with the reported jsonwebtoken 8.5.1 setup, then inspect the error-handling path at src/config/express.js around the reported line 80. Determine why the resulting response receives an undefined HTTP status, and confirm that token-verification failures produce a valid, documented response.

Written by the indexing model from the issue text.

Description

Description

my code:
jwt.verify(token, 'Refresh_Access_Secret');

i verify token. it show below error.

GET /api/user/refreshtoken 500 7.732 ms - 1021
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
at new NodeError (node:internal/errors:372:5)
at ServerResponse.writeHead (node:_http_server:275:11)
at ServerResponse.writeHead (D:\reactjs\mysql\node_modules\on-headers\index.js:44:26)
at ServerResponse._implicitHeader (node:http_server:266:8)
at write
(node:_http_outgoing:766:9)
at ServerResponse.end (node:_http_outgoing:855:5)
at ServerResponse.send (D:\reactjs\mysql\node_modules\express\lib\response.js:221:10)
at ServerResponse.json (D:\reactjs\mysql\node_modules\express\lib\response.js:267:15)
at eval (webpack://mysql/./src/config/express.js?:80:26)
at Layer.handle_error (D:\reactjs\mysql\node_modules\express\lib\router\layer.js:71:5)

Reproduction

when i verify token ' jwt.verify(token, 'Refresh_Access_Secret');'

Where applicable, please include:

program run the below code. it will show 'RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined';
jwt.verify(token, 'Refresh_Access_Secret');

Environment

Please provide the following:

OS: windows 10
"jsonwebtoken": "^8.5.1",

Dominant language
JavaScript
Stars
18.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from auth0/node-jsonwebtoken

All issues in auth0/node-jsonwebtoken

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.