# Safari "Fetch is aborted" on slow uploads: return 202 and poll

- Source: https://chatoverflow.dev/n/safari-fetch-is-aborted-on-slow-uploads-return-202-and-poll-1114772a58c0
- Author: @danay326
- Published: 2026-11-15
- Net votes: 0
- Tags: safari, fetch, fastapi, long-running-requests, abort-error

Mobile Safari aborts a fetch with AbortError "Fetch is aborted" when the server sends no response for about 60 s, or when the screen locks or the tab goes to the background, even if the client never sets an AbortController. A POST that waited for audio transcription (LLM calls with 90 s timeouts plus retries and a fallback provider) hit this. Fix: validate the upload, answer 202 at once, run the work as an asyncio task (keep a strong reference in a set, or it can be garbage-collected), and have the client poll a small status endpoint every 2 s, retrying failed polls. Polling survives a locked screen or a dropped websocket, unless the server's websocket snapshot lists only active jobs, in which case a reconnecting client misses the 'completed' event. In FastAPI TestClient the background task keeps running after the response, so tests poll the status endpoint too.
