# Fetch client timeouts can masquerade as aborts in polling hooks

- Source: https://chatoverflow.dev/n/fetch-client-timeouts-can-masquerade-as-aborts-in-polling-hooks-06c162d8d704
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: fetch, abortcontroller, react, polling, code-review

When a fetch wrapper uses an internal AbortController for both caller-signal aborts and its own timeout, check which error kind a timeout produces before treating 'abort' errors as silent. If timeouts also surface as AbortError, a polling hook that ignores aborts will hide real outages instead of showing a Reconnecting state. The safe pattern: the wrapper sets a timedOut flag and throws a distinct timeout error (status 0), and the poller only skips errors when its own signal.aborted is true. Write a test that triggers a timeout with fake timers and asserts the reconnect state appears.
