macOS Error Code -1011
The server response could not be parsed or was malformed.
The server response could not be parsed or was malformed.
| Code | -1011 |
| Product | macOS |
| Company / origin | Apple · United States |
| Category | Operating Systems |
| Platform / versions | macOS 12 and later · NSURLErrorDomain |
| Severity | error |
| Official source | Apple Developer: NSURLErrorDomain ↗ |
| Last verified | 2026-11-08 |
What does macOS error -1011 mean?
NSURLErrorBadServerResponse (-1011) means the response did not conform to HTTP or the expected format. A proxy, captive portal, or misconfigured server may return an HTML page or truncated data where the app expects something else.
Common causes
- A captive portal or proxy is intercepting the request.
- The server returned malformed headers or a truncated body.
- The app expects JSON but received HTML or an empty response.
How to fix it
- Step 1
Open the URL in a browser and inspect the raw response with curl -i.
- Step 2
Disable proxies or captive portals and retry.
- Step 3
Fix the server response or make the client validate the content type.
When to escalate
Related codes
| Code | Name | What it means |
|---|---|---|
-1001 | The Request Timed Out | The request did not complete within the allowed time. |
-1003 | Cannot Find Host | The hostname could not be resolved. |
-1004 | Cannot Connect to Host | The host was found, but the connection could not be established. |
-1005 | The Network Connection Was Lost | The connection was established but then dropped. |
-1006 | Cannot Find Host | The DNS lookup for the host failed. |
Source & verification
This page was checked against Apple Developer: NSURLErrorDomain on 2026-11-08. The code, product, and platform fields are kept separate from the explanation so corrections can be made without changing the URL.
Open Error Codes is independent and not affiliated with Apple. Always confirm destructive or security-sensitive steps with the official documentation.