Error reference
The full meaning of every HTTP status, SOCKS5 reply code and API error code, plus where to look next.
HTTP forwarding and HTTPS CONNECT errors before tunnel establishment return a specific status, an X-NextProxy-Error header and a safe JSON body. Use the status for the category and the machine code for the cause. Responses do not expose internal addresses or proxy passwords.
HTTP status and machine codes
| HTTP | X-NextProxy-Error / error.code | Meaning and action |
|---|---|---|
400 | invalid_request | Invalid request, destination or protocol format; correct the client request |
400 | invalid_proxy_parameters | Invalid username option syntax, order, range or dependency; check country, session and time |
407 | proxy_auth_required | Missing or unparseable proxy authentication; ensure the client sends Basic credentials |
407 | invalid_credentials | Username or password does not match; copy the original text and check case, I, l and 1 |
403 | account_disabled / account_expired | Account disabled or expired; check status and expiry |
403 | access_denied | Account permissions, source binding or port authentication mode does not allow access |
403 | target_denied | Destination, port or access policy does not allow the request |
402 | traffic_exhausted | Shared user traffic pool exhausted; add traffic |
402 | account_quota_exhausted | Sub-account traffic cap exhausted; adjust that account's cap |
402 | quota_exhausted | Available quota or quota lease exhausted; check remaining allowance |
429 | connection_limit | Authenticated account concurrency or connection rate exceeded; reduce concurrency and back off |
500 | internal_error | Internal platform processing error; retain the time and code for support |
502 | upstream_connection_failed | Exit connection, resolution or handshake failed; retry with bounded backoff |
503 | service_unavailable | No matching proxy IP, or authentication/quota service temporarily unavailable; retry later or relax targeting |
504 | upstream_timeout | Timed out while establishing the proxy connection; retry with bounded backoff |
An exit connection that receives 403 or 407 during establishment returns 502 upstream_connection_failed; it is not a customer credential error. Authentication-service timeouts return 503 service_unavailable.
407 also returns Proxy-Authenticate: Basic realm="NextProxy". Both missing and incorrect credentials use 407, distinguished by the machine code; incorrect credentials no longer produce a generic 403.
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="NextProxy"
X-NextProxy-Error: invalid_credentials
Content-Type: application/json; charset=utf-8
Content-Length: 92
Cache-Control: no-store
Connection: close
{"error":{"code":"invalid_credentials","message":"Proxy username or password is incorrect"}}
The body's message is a customer-facing explanation, not a programmatic contract: match code. Some clients hide the body when CONNECT fails; read the response header in that case. All gateway errors include Content-Length and Cache-Control: no-store; 429 and 503 also include Retry-After: 1. Wait at least that long before a bounded retry. The header concerns this proxy response, not the separate retry values of REST extraction APIs.
Inspecting errors with cURL
curl -v --connect-timeout 10 --max-time 30 \
--proxy 'http://GATEWAY_HOST:58971' \
--proxy-user 'USERNAME-country-US:PASSWORD' \
'https://api.ipify.org'
For plain HTTP forwarding, use curl -i to see the status, headers and JSON. curl -v writes diagnostics to standard error. Avoid hiding failures with -s; use -sS when quiet output is needed. Remove Proxy-Authorization and real passwords before sharing logs. Do not paste Markdown [text](URL) as a proxy URL or obtain credentials through screenshot recognition.
Gateway errors versus destination errors
200 Connection Established means only that the CONNECT tunnel is ready. A later 403, 429 or other HTTP status belongs to the destination website, not proxy authentication. Once an HTTPS tunnel is established, the gateway does not decrypt the destination response and cannot insert a JSON error. Later interruptions are diagnosed using the closed connection and operator records.
Identify the response source before retrying. Gateway 400, 402, 403 and 407 require fixing parameters, quota or permissions; 429 requires lowering concurrency; 502, 503 and 504 allow bounded exponential backoff. For non-idempotent destination requests, verify whether the action executed before replaying it.
Cases without an HTTP response
Before protocol detection, global connection protection, per-source-IP concurrency/rate limits, first-byte timeouts and resource high-water marks may still close TCP directly. A stream interrupted after tunnel establishment also cannot become a new HTTP status. Record the time, gateway, account and client error for support instead of interpreting every disconnect as 403.
SOCKS5
SOCKS5 uses negotiation and REP values, not HTTP statuses, JSON or X-NextProxy-Error.
| Stage | Value | Meaning |
|---|---|---|
| Method negotiation | 0x02 | Username/password authentication; standard account port |
| Method negotiation | 0x00 | No authentication; passwordless ports only |
| Method negotiation | 0xff | No acceptable authentication method |
| RFC 1929 authentication | 01 00 | Authentication succeeded |
| RFC 1929 authentication | 01 01 | Authentication failed; credentials, options, account or auth dependencies may cause this |
| CONNECT REP | 0x00 | Success |
| CONNECT REP | 0x01 | Other connection or service failure |
| CONNECT REP | 0x02 | Policy, quota or account concurrency restriction |
| CONNECT REP | 0x05 | Connection refused |
| CONNECT REP | 0x06 | Connection timeout |
| CONNECT REP | 0x07 | Unsupported command; UDP ASSOCIATE / BIND |
| CONNECT REP | 0x08 | Unsupported address type |
The authentication protocol can only report success or failure, so HTTP categories do not map one-to-one. For diagnosis, temporarily send an HTTP CONNECT request with the same credentials to obtain the machine code, then return to SOCKS5. Operator records retain more specific failure causes.
Extract API error codes
Responses are structured JSON (with type=json) carrying a specific code:
| Status | Code | Meaning |
|---|---|---|
400 | invalid_proxy_extract_time | time not an integer or outside 1–120; sticky missing time; rotating supplied time |
400 | invalid_proxy_extract_count | num outside 1–100 |
400 | invalid_proxy_extract_type | type is neither txt nor json |
400 | invalid_proxy_extract_format | format is not \n / \r\n / , |
400 | invalid_proxy_extract_session | session is neither sticky nor rotating |
401 | proxy_api_key_invalid | Invalid key; account or user unavailable / expired |
403 | proxy_source_not_whitelisted | Source IP not whitelisted |
422 | proxy_api_invalid | Region or session combination unavailable |
429 | proxy_extract_rate_limited | Over 120/min; includes Retry-After: 60 |
502 | client_ip_unavailable | The caller's public IPv4 could not be determined |
503 | proxy_gateway_unavailable | No healthy gateway / binding unconfirmed / ports exhausted; includes Retry-After: 2 |
500 | internal_error | Internal error |
Full parameter documentation is in Extract API.
Client API error codes
A uniform structure:
{
"error": {
"code": "machine_readable_code",
"message": "human-readable explanation",
"fields": { "FieldName": "validationTag" }
}
}
The common ones:
| Status | Code | Meaning |
|---|---|---|
401 | — | Access token missing or expired (15 minutes only) |
403 | origin_rejected | A write operation without a trusted Origin header |
409 | proxy_account_limit_reached | Sub-account limit exceeded (10 normally, 2 in the first 24 hours) |
409 | proxy_api_limit_reached | Whitelist limit exceeded (10 per account) |
402 | quota_exhausted | Traffic allowance exhausted |
429 | — | Risk-control rate limit triggered |
Proxy ports use the HTTP/SOCKS5 contract above. Customer management and extraction API 401/403 responses follow their own REST authentication rules and must not be replaced with proxy 407. See the troubleshooting flow.