Abort this node-fetch request without aborting all other requests

I tried to reproduce the behaviour of controller.abort() aborting ALL current requests, but it seems to work as expected and I doubt that it's a bug in node-fetch.

I think the problem is how you handle the errors when you execute the requests in parallel (presumably) using Promise.all. As stated in the docs it rejects immediately upon any of the input promises rejecting or non-promises throwing an error, and will reject with this first rejection message / error.

You are probably looking for Promise.allSettled instead, as it resolves after all of the given promises have either fulfilled or rejected independently of each other. So it could look something like this:

(async () => {
    const parallelRequests = [];
    for (let i = 0; i < 5; i++) {
        parallelRequests.push(fetchWithTimeout('http://some-url.com'));
    }
    const result = await Promise.allSettled(parallelRequests);
    // result will be an array holding status information about each promise and the resolved value or the rejected error
})();

The reason why your second approach works with Promise.all, is that you actually catch and handle errors from the fetch-call. But be aware that in case of non-aborted error, you re-throw the error which will again cause an immediate rejection regardless of the other requests.