Node.js ships a built-in fetch since v18, but it does not handle timeouts, streaming, or HTTP errors the way production code needs. Here is a zero-dependency HTTP client class that wraps fetch with every safeguard your API calls require.
Every time you wrap an error in another error, you bury the original stack trace. Error.cause is the ES2022 feature that preserves the full chain, and it will save you hours of production debugging.