forwardemail / forwardemail/supertest
Keep getting error: "invalid json response body at reason: Unexpected end of JSON input"
Open
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 782
- PR merge metrics
- No merged PRs in 30d
Description
```
FetchError: invalid json response body at reason: Unexpected end of JSON input
at node_modules/node-fetch/lib/index.js:272:32
```
Here is my code:
```
const response = await request(app)
.get('/api/demos')
.expect(200);
```
Contributor guide
Research direction
Start by reproducing the request shown against the /api/demos endpoint and inspect the response body and headers. Read the node_modules/node-fetch/lib/index.js stack location and determine whether the failure is in the endpoint response or Supertest's handling; done means the cause and a concrete project change are identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100