If server terminates connection before response is fully transmitted that should cause an error. In fact that seems to be the case when consuming the response e.g. via response.text() API. However if response.body is used directly via for await loop no errors are reported.
Reproduction
Test case is provided by #1056
Expected behavior
Following code should log error if connection is terminated before transmission is complete, instead loop is complete without any errors
try {
for await (const chuck of response.body) {
// ...
}
} catch(error) {
console.error(error)
}
Screenshots
Same code in browsers produces error as expected here is an example (querying same server) as the attached test:

Your Environment
| software |
version |
| node-fetch |
master |
| node |
v12.18.2 |
| npm |
6.14.5 |
| Operating System |
Mac |