Describe the bug
On a request timeout Axios should throw an AxiosError, but when using the fetch adapter in Safari a TypeError: The DOMException.message getter can only be used on instances of DOMException is thrown.
userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15
To Reproduce
- Use Safari
- Make a request using the
fetch adapter and make it timeout
- On timeout it throws a
TypeError: The DOMException.message getter can only be used on instances of DOMException
Sandbox with a request that always ends in timeout: https://codesandbox.io/p/sandbox/zkm26r
Code snippet
axios.get("https://fakeresponder.com/?sleep=50000", { adapter: "fetch", timeout: 2000 });
axios.get("https://api.example.com", { adapter: "fetch", timeout: 1 });
Expected behavior
Should throw an AxiosError with the timeout info, like the default adapter:
{
message: "timeout 2000 of ms exceeded",
code: "ETIMEDOUT",
name: "AxiosError"
}
Axios Version
1.13.0
Adapter Version
fetch
Browser
Safari
Browser Version
26.0.1
Node.js Version
No response
OS
OSX 15.6.1
Additional Library Versions
Additional context/Screenshots
Describe the bug
On a request timeout Axios should throw an AxiosError, but when using the
fetchadapter in Safari aTypeError: The DOMException.message getter can only be used on instances of DOMExceptionis thrown.userAgent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15To Reproduce
fetchadapter and make it timeoutTypeError: The DOMException.message getter can only be used on instances of DOMExceptionSandbox with a request that always ends in timeout: https://codesandbox.io/p/sandbox/zkm26r
Code snippet
Expected behavior
Should throw an AxiosError with the timeout info, like the default adapter:
Axios Version
1.13.0
Adapter Version
fetch
Browser
Safari
Browser Version
26.0.1
Node.js Version
No response
OS
OSX 15.6.1
Additional Library Versions
Additional context/Screenshots