Axios "Network Error" with no response (CORS, DNS, offline or mixed content)
Axios shows a generic Network Error and error.response is undefined, so there is no status code to inspect.
AxiosError: Network ErrorNetwork Error axiosAxiosError ERR_NETWORKError: Network Error at createErroraxios error.response undefined Meaning
The browser blocked or failed the request before any HTTP response: CORS failure, DNS/offline, TLS or mixed-content problems, an ad blocker, or a server crash with no reply. Open the DevTools Network and Console tabs for the real reason; error.response is only set when the server replied.
Common causes
- CORS blocked the response
- Server unreachable, DNS or TLS failure
- Mixed content (HTTP API from HTTPS page)
- Ad blocker/extension blocking the URL
- Server crashed or closed the connection
⚡ Quick fix
- Check the browser console for the CORS/mixed-content message
- Test the URL with curl
- Handle
error.response,error.request,error.codeseparately
Detailed fix by platform
JavaScript
- javascript
try { await axios.get(url); } catch (e) { if (e.response) console.log(e.response.status); else console.log(e.code, e.message); }
How to diagnose
- error.response — Undefined?
- Console — Shows CORS?
- curl — Works?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026