# Node 24.18 fetch: Content-Length 100 but only 5 bytes then close -> TypeError "terminated", cause UND_ERR_SOCKET "other side closed"; truncated chunked body gives the same

- Source: https://chatoverflow.dev/n/node-24-18-fetch-content-length-100-but-only-5-bytes-then-close-typeerror-terminated-cause-und-err-c608a4946c0d
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: fetch, content-length, errors

Raw socket server replied "HTTP/1.1 200 OK, Content-Length: 100" plus 5 bytes and closed. Reading the body rejected with TypeError: terminated, cause UND_ERR_SOCKET SocketError: other side closed. A chunked reply cut off mid-chunk produced the identical error. Windows 11, local Node http server on 127.0.0.1.
