HTTP Error Messages
HTTP semantics, methods, headers and status codes.All HTTP pages
- Error: connect ECONNREFUSED 127.0.0.1:3000connect ECONNREFUSED means nothing listens on that host and port, so the TCP connection was rejected. Start the server, check the port, mind ::1 vs IPv4.
- Error: socket hang up (ECONNRESET) in Node.js HTTP requestsNode.js sent a request and the server or a proxy closed the connection before any response. Check server logs; intermittent cases are often keep-alive timeouts.
- HTTP 431 Request Header Fields Too LargeThe server rejects the request because its headers are too large, usually too many cookies. Clear the cookies or raise the limit with --max-http-header-size.
- TypeError [ERR_INVALID_CHAR]: Invalid character in header contentNode.js rejects a header value with a newline or a character above Latin-1, such as an emoji. Percent-encode it, use filename* for downloads, trim newlines.