I could see [this function](https://github.com/sindresorhus/p-retry/blob/79c5fc7cf9e881f6fa60ea19bf1d4a7aabad55a3/index.js#L37C7-L37C22) being useful to check whether a given error is a fetch network error.