Box’a’Fox

Errors

Every API error code and every gateway error code.

API errors

An error is a JSON body with a stable code:

{
  "error": "insufficient_credit",
  "message": "Not enough credit for this order.",
  "request_id": "req_01J9ZK3V6T4M8Q2W7X5N0B1C3D",
  "details": { "required_cents": 2500, "available_cents": 1200 }
}
  • Branch on error, never on message.
  • message is written for people and safe to show to your users.
  • request_id equals the X-Request-Id header. Include it when you contact support.
  • details is present only where listed below.
StatuserrorMeaning
400validation_errorA parameter or body field is wrong or unknown. details names the field and the reason.
400bad_targetThe targeting is not valid for the network, for example a ZIP code on residential.
401unauthorizedThe API key is missing or not valid.
401key_revokedThe API key was revoked.
402insufficient_creditNot enough credit for the order. details: required_cents, available_cents.
403account_suspendedThe account is suspended. Only GET /v1/me answers.
403forbiddenThe credential may not do this.
404not_foundNo such object on your account.
409conflictThe object's state does not allow it, for example disabling the default proxy user.
409username_takenThe proxy username is in use or was used before.
409limit_reachedThe account has its maximum of this object. details: limit, max.
409idempotency_conflictThe Idempotency-Key was used with a different body.
409idempotency_in_flightThe first request with this key is still running. Retry after Retry-After.
422limit_below_usageA proxy user's new limit is below what it already used.
422product_unavailableThe product cannot be bought right now.
422below_min, above_maxThe amount is outside the product's min_gb and max_gb.
422promo_invalidThe promo code is not valid.
429rate_limitedToo many requests. Wait for Retry-After seconds.
500internal_errorSomething failed on our side. Retry; if it persists, send us the request_id.
502upstream_errorThe network could not complete the request. Retry shortly.
503maintenanceThe API is briefly unavailable. Retry shortly.

POST /v1/checkout/quote does not use the 4xx codes for a cart that cannot be bought: it answers 200 with is_valid: false and the same code in invalid_reason.

Gateway errors

When the gateway refuses a proxy connection, an HTTP proxy client gets the status below with two headers: X-Proxy-Error with the code and X-Proxy-Request-Id. A SOCKS5 client gets the closest SOCKS reply (general failure, not allowed, or network unreachable) and the connection closes.

StatusX-Proxy-ErrorMeaningWhat to do
407auth_failedUnknown proxy user, wrong password, or the user is disabled.Check the username and password.
400bad_targetThe username's tokens are malformed or not supported by the network.See Targeting.
429quota_exhaustedThe network's data balance is used up.Buy data.
429user_limit_exhaustedThe proxy user reached its own limit for the network.Raise the limit or use another proxy user.
422quota_expiredThe network's balance passed its valid_until date.Buy data to extend it.
429concurrency_limitToo many connections open at once.Close connections or lower your parallelism.
403account_suspendedThe account is suspended.Check GET /v1/me for the reason.
403target_blockedThe destination is blocked: mail ports and private addresses.Use an allowed destination.
503network_provisioningThe mobile network is still being set up after a purchase.Retry in a moment.
503no_node_for_targetNo IP is available for the location.Widen the target or retry later.
502upstream_errorThe connection through the network failed.Retry; with a session, try a new session id.

On this page