bendevorg / bendevorg/reporter
Error: Can't set headers after they are sent.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
View details in Rollbar: [https://rollbar.com/guiconti/reporter/items/4/](https://rollbar.com/guiconti/reporter/items/4/)
```
Error: Can't set headers after they are sent.
File "_http_outgoing.js", line 504, in validateHeader
File "_http_outgoing.js", line 511, in ServerResponse.setHeader
File "/Users/guiconti/GitHub/reporter/node_modules/express/lib/response.js", line 767, in ServerResponse.header
this.setHeader(field, value);
File "/Users/guiconti/GitHub/reporter/node_modules/express/lib/response.js", line 170, in ServerResponse.send
this.set('Content-Type', setCharset(type, 'utf-8'));
File "/Users/guiconti/GitHub/reporter/node_modules/express/lib/response.js", line 267, in ServerResponse.json
return this.send(body);
File "/Users/guiconti/GitHub/reporter/server/controllers/sendError.js", line 44, in Request.request.post [as _callback]
return res.status(200).json({
File "/Users/guiconti/GitHub/reporter/node_modules/request/request.js", line 186, in self.callback
self._callback.apply(self, arguments)
File "events.js", line 115, in emitOne
File "events.js", line 210, in Request.emit
File "/Users/guiconti/GitHub/reporter/node_modules/request/request.js", line 878, in Request.onRequestError
self.emit('error', error)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in server/controllers/sendError.js at line 44 and trace the request callback shown in the stack trace, along with the Express response path. Reproduce the reported error if possible and determine why the response is attempted after headers were sent; done means this error no longer occurs for the reported request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100