Node.js ERR_HTTP_HEADERS_SENT
Code attempted to write HTTP headers or send a second response after headers were already sent.
Runs locally in browser
Free · No login
Available (Noindex) · 2026-11-24
v1.0.0
Identifier: Node.js ERR_HTTP_HEADERS_SENT
Platform: Node.js
Interactive Diagnostic Checklist
Safe Diagnostic Command:
grep -rn "res\.send\|res\.end" src/
Technical Explanation
Code attempted to write HTTP headers or send a second response after headers were already sent. Recommended verified resolution path: Always `return` immediately after sending an error or redirect response.
Worked Examples
- Read-only diagnostic command: grep -rn "res\.send\|res\.end" src/
Limitations & Assumptions
- Error codes can arise from multiple layers (client, CDN, reverse proxy, application, or OS). Always confirm which layer emitted the error before applying changes.
Source References & Verification
- RFC 9110 — HTTP Semantics & Official Vendor Documentation
- Linux man-pages / Python / MDN / Docker Official Docs
Resource ID: err-node-headers-sent · Technical check: 2026-11-24 (noindex pending/withheld from search)