fix(fetch): normalize Safari timeout errors to AxiosError #7191
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🐞 Bug Fix: Safari TypeError on Fetch Timeout
Axios should throw a proper
AxiosErrorwhen a request times out, but in Safari the fetch adapter throws a restricted DOM error:This causes Axios to incorrectly classify the timeout as a generic network failure instead of a timeout error.
✅ Expected Behavior
{ "message": "timeout 2000 of ms exceeded", "code": "ETIMEDOUT", "name": "AxiosError" }❌ Actual Safari Behavior
🔧 What This PR Fixes
This PR ensures Safari timeout errors thrown by the fetch adapter are converted into proper Axios timeout errors by using:
Environment:
• Safari: 26.0.1
• macOS: 15.6.1
• Axios: 1.13.0
• Adapter: fetch
🔗 Related Issue