I've released tanstack-fetch 1.7.1, a bug-fix release focused on the core HTTP request path.
No new APIs in this version—just fixes for edge cases that can cause confusing behavior in real applications.
npm install tanstack-fetch@1.7.1
What's Changed?
1. URL parameters are matched more precisely
Colons in URLs such as http://localhost:8080 and query values such as ?t=10:30 are no longer mistaken for path parameters. Only the pathname is scanned for :id and {id} placeholders.
2. Timeouts are recognized as aborts
A timeout now rejects with TimeoutError, and isAbortError() recognizes it. This separates timeouts from ordinary network failures and cancellations.
3. Timeout timers are cleaned up
Timers are cleared when request attempts finish and unreferenced in Node.js, avoiding unnecessary process-lifetime extension in SSR and serverless environments.
4. Binary and stream request bodies work as intended
Typed arrays, DataView, and ReadableStream are sent in their intended formats rather than being JSON-encoded. Node stream requests set duplex: 'half'.
5. HTTP errors keep their real status
A gateway response such as 502 with an HTML body no longer gets reduced to a parsing error. The error preserves status, uses HTTP_ERROR, exposes raw text as error.body, and runs onResponseError interceptors.
try {
await api.get('/gateway')
} catch (error) {
if (isFetchError(error)) {
console.log(error.status) // 502
console.log(error.code) // 'HTTP_ERROR'
console.log(error.body) // raw gateway response
}
}
One Migration Detail
If your code detects timeouts with error.code === 'NETWORK_ERROR', update it to use isAbortError(error) and check for TimeoutError when needed.
Timeout failures no longer pass through onRequestError interceptors, so review custom retry logic that depends on those interceptors. You can handle TimeoutError at the call site or use TanStack Query's retry behavior.
Try It
npm install tanstack-fetch@1.7.1
Full release notes:
https://mohamadgarmabi.github.io/tanstack-fetch/blog/tanstack-fetch-1-7-1
tanstack-fetch is an independent project, not an official TanStack package. Feedback and bug reports are welcome.
— Mohammad Garmabi

Top comments (0)