### Describe the bug

https://github.com/developer-choi/axios-error-report

TypeError is occurred (in 1.6.6 version)

<img width="184" alt="image" src="https://github.com/axios/axios/assets/51902362/1f7f6e7f-8c8b-4ef7-9854-5c08f572d58b">

<img width="171" alt="image" src="https://github.com/axios/axios/assets/51902362/36042439-a071-485e-b696-9f2c01849759">

### To Reproduce

https://github.com/developer-choi/axios-error-report

### Code snippet

_No response_

### Expected behavior

_No response_

### Axios Version

1.6.6

### Adapter Version

_No response_

### Browser

CHROME

### Browser Version

120.0.6099.225

### Node.js Version

20.11.0

### OS

Window 11
test/unit/adapters/http.js
let stream = generateReadableStream();
      setTimeout(function () {
        stream.destroy();
      }, 1000);
      const {data} = await axios.post(LOCAL_SERVER_URL, stream, {responseType: 'stream'});
      let streamError;
      data.on('error', function(err) {
        streamError = err;
      });
      try {
        await pipelineAsync(data, devNull());
        assert.fail('stream was not aborted');
      } catch(e) {
        console.log(`pipeline error: ${e}`);
      } finally {
        assert.strictEqual(streamError && streamError.code, 'ERR_CANCELED');
      }
    });
  });
  it('should support buffers', function (done) {
    var buf = Buffer.alloc(1024, 'x'); // U
    server = http.createServer(function (req, res) {
      assert.equal(req.headers['content-length'], buf.length.toString());
      req.pipe(res);
    }).listen(4444, function () {
      axios.post('http://localhost:4444/',
        buf, {
          responseType: 'stream'
        }).then(function (res) {
          var stream = res.data;