Skip to content
NextProxyNextProxyDocs

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

HTTPX-NextProxy-Error / error.codeMeaning and action
400invalid_requestInvalid request, destination or protocol format; correct the client request
400invalid_proxy_parametersInvalid username option syntax, order, range or dependency; check country, session and time
407proxy_auth_requiredMissing or unparseable proxy authentication; ensure the client sends Basic credentials
407invalid_credentialsUsername or password does not match; copy the original text and check case, I, l and 1
403account_disabled / account_expiredAccount disabled or expired; check status and expiry
403access_deniedAccount permissions, source binding or port authentication mode does not allow access
403target_deniedDestination, port or access policy does not allow the request
402traffic_exhaustedShared user traffic pool exhausted; add traffic
402account_quota_exhaustedSub-account traffic cap exhausted; adjust that account's cap
402quota_exhaustedAvailable quota or quota lease exhausted; check remaining allowance
429connection_limitAuthenticated account concurrency or connection rate exceeded; reduce concurrency and back off
500internal_errorInternal platform processing error; retain the time and code for support
502upstream_connection_failedExit connection, resolution or handshake failed; retry with bounded backoff
503service_unavailableNo matching proxy IP, or authentication/quota service temporarily unavailable; retry later or relax targeting
504upstream_timeoutTimed 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
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

shell
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.

StageValueMeaning
Method negotiation0x02Username/password authentication; standard account port
Method negotiation0x00No authentication; passwordless ports only
Method negotiation0xffNo acceptable authentication method
RFC 1929 authentication01 00Authentication succeeded
RFC 1929 authentication01 01Authentication failed; credentials, options, account or auth dependencies may cause this
CONNECT REP0x00Success
CONNECT REP0x01Other connection or service failure
CONNECT REP0x02Policy, quota or account concurrency restriction
CONNECT REP0x05Connection refused
CONNECT REP0x06Connection timeout
CONNECT REP0x07Unsupported command; UDP ASSOCIATE / BIND
CONNECT REP0x08Unsupported 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:

StatusCodeMeaning
400invalid_proxy_extract_timetime not an integer or outside 1–120; sticky missing time; rotating supplied time
400invalid_proxy_extract_countnum outside 1–100
400invalid_proxy_extract_typetype is neither txt nor json
400invalid_proxy_extract_formatformat is not \n / \r\n / ,
400invalid_proxy_extract_sessionsession is neither sticky nor rotating
401proxy_api_key_invalidInvalid key; account or user unavailable / expired
403proxy_source_not_whitelistedSource IP not whitelisted
422proxy_api_invalidRegion or session combination unavailable
429proxy_extract_rate_limitedOver 120/min; includes Retry-After: 60
502client_ip_unavailableThe caller's public IPv4 could not be determined
503proxy_gateway_unavailableNo healthy gateway / binding unconfirmed / ports exhausted; includes Retry-After: 2
500internal_errorInternal error

Full parameter documentation is in Extract API.

Client API error codes

A uniform structure:

json
{
  "error": {
    "code": "machine_readable_code",
    "message": "human-readable explanation",
    "fields": { "FieldName": "validationTag" }
  }
}

The common ones:

StatusCodeMeaning
401Access token missing or expired (15 minutes only)
403origin_rejectedA write operation without a trusted Origin header
409proxy_account_limit_reachedSub-account limit exceeded (10 normally, 2 in the first 24 hours)
409proxy_api_limit_reachedWhitelist limit exceeded (10 per account)
402quota_exhaustedTraffic allowance exhausted
429Risk-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.

Did this page solve your problem?