> For the complete documentation index, see [llms.txt](https://docs.spacecoin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spacecoin.org/spacerouter-proxy/service-user-guide/errors-and-troubleshooting.md).

# Errors & Troubleshooting

### HTTP status codes

<table><thead><tr><th width="83.484375">Code</th><th width="160.7734375">Name</th><th>Meaning</th><th>Fix</th></tr></thead><tbody><tr><td><strong>402</strong></td><td>Payment Required</td><td>Escrow balance is below the request price (SPACE).</td><td>Run <code>spacerouter escrow deposit</code>.</td></tr><tr><td><strong>407</strong></td><td>Proxy Authentication Required</td><td>Payment headers landed on the inner request instead of the CONNECT, or the challenge signature was rejected.</td><td>Use the SDK helper — it puts headers on CONNECT and signs each fresh challenge.</td></tr><tr><td><strong>429</strong></td><td>Too Many Requests</td><td>You're hitting the rate limit (60 RPM per wallet by default).</td><td>Honor the <code>Retry-After</code> header and back off.</td></tr><tr><td><strong>502</strong></td><td>Bad Gateway / Upstream Error</td><td>The Provider reached your target site but got an error from it (e.g. site rejected the IP).</td><td>Try a different region or IP type.</td></tr><tr><td><strong>503</strong></td><td>Service Unavailable</td><td>No Provider currently matches your region/IP-type filter.</td><td>Drop the type filter or pick a more popular region.</td></tr></tbody></table>

### Common scenarios

#### "It worked yesterday, today every request is 402"

Almost always: your escrow balance has run out. Check it with `spacerouter escrow balance 0xYourAddress`, then top up with `spacerouter escrow deposit <amount_wei>`.

If the balance is fine but the gateway still returns `402 api_key_auth_deprecated`, your client is on the legacy `Proxy-Authorization: Basic sr_live_…` flow. Upgrade to the v1.5 SDK and switch to the wallet + `payment` constructor.

#### Some target sites block me

The IP type matters. Hosting IPs are commonly blocked by anti-bot systems. Try `type=residential` or `type=mobile`.

#### "503 No nodes available" for every request

Your region/type combination has no live Providers right now. Pick a more popular region (e.g. `US`, `KR`, `JP`) or drop the type filter and let the gateway pick.

#### SPACE deposit transaction reverts

Most likely: your wallet has SPACE but no CTC for gas, or the escrow allowance was never granted. The CLI handles approval automatically; if you're calling the contract directly, run `token.approve(escrow, amount)` first.

#### SDK calls hang forever

You're behind a corporate firewall that blocks port 8080. Use the HTTPS gateway URL (`https://gateway.spacerouter.org`) — it tunnels over 443.

### Get help

If you've checked the above and you're still stuck:

* Email [**router.support@spacenetwork.com**](mailto:router.support@spacenetwork.com) with the request ID from the response headers (`X-Request-Id`).
* For SDK bugs, file an issue on the public repos.
