Proxy Error Codes Explained: 407, 429, 502 and the Rest
Most proxy errors fall into two groups: problems reaching or authenticating with the proxy (407, connection refused, 502) and problems the target has with your request (403, 429, 503). Telling the two apart is the whole diagnosis, because a 407 is a credentials problem you can fix in seconds while a 429 is a pacing problem no configuration change will solve.
- troubleshooting
- proxy errors
- http status codes

Table of contents
The single most useful habit in proxy debugging is asking one question before anything else: did the proxy answer, or did the target? Everything downstream of that question is straightforward, and almost every hour wasted on this comes from skipping it.
Errors from the proxy
407 Proxy Authentication Required
The proxy rejected your credentials, or you sent none. This is the most common error and almost always one of four things: a typo in the username or password, a client that does not send proxy credentials at all, IP authentication configured but your current address not on the allowlist, or an expired plan. All eight causes and their tests are in the full 407 guide.
Check it directly with curl before touching your application. If curl -x user:pass@host:port https://example.com works and your code does not, the problem is in how your client passes credentials — a common gap with tools that support proxies but not proxy authentication.
Connection refused / timeout on connect
Nothing is listening where you are dialling. Wrong port is the usual cause — HTTP and SOCKS5 endpoints normally differ. A local firewall or corporate network blocking outbound connections on non-standard ports is the second most common, and an expired or deprovisioned IP the third.
502 Bad Gateway
The proxy accepted your request but could not complete the upstream fetch. On residential pools this is normal background noise: exits are real devices, and devices go offline mid-request. A small percentage of 502s is expected and the correct handling is an immediate retry on a new exit.
A sustained 502 rate above roughly 5% is not normal. Check whether you are pinning a sticky session for too long, or targeting a location with a thin pool.
504 Gateway Timeout
The upstream took longer than the timeout allowed. Either the target is slow, or your timeout is tighter than a residential round trip warrants. Residential exits routinely add 200–400ms before the target does any work, so a 5-second total timeout is optimistic.
Errors from the target
403 Forbidden
The site refused you. The request arrived intact — this is a judgement about who you appear to be. Common causes are a flagged exit IP, headers inconsistent with the browser you claim to be, a missing cookie the site expects, or a TLS fingerprint that does not match your User-Agent.
Test whether it is the IP or the request: retry the identical request on a different exit. If it succeeds, the exit was flagged. If it fails again, your request shape is the problem and rotating forever will not help. The 403 guide walks through each layer that can produce one.
429 Too Many Requests
You exceeded the target's rate limit for that identity. Honour any Retry-After header, lower your per-exit rate, and spread load across more exits. Retrying immediately on the same exit typically extends the penalty — the 429 guide covers how to work out what is being counted.
503 Service Unavailable
Ambiguous: either genuine overload, or a polite refusal from a bot-protection layer. Check the body. A real 503 is short-lived and affects everyone; a protection page will usually say something about verifying your browser.
Quick reference
| Code | Source | Meaning | First action |
|---|---|---|---|
| 407 | Proxy | Auth failed or missing | Verify credentials with curl |
| Refused | Proxy | Nothing listening | Check port and protocol |
| 502 | Proxy | Upstream fetch failed | Retry on a new exit |
| 504 | Proxy | Upstream too slow | Raise timeout, then retry |
| 403 | Target | Refused on identity | Retry on new exit to isolate |
| 429 | Target | Rate limited | Honour Retry-After, slow down |
| 503 | Target | Overload or bot wall | Inspect the response body |
Test a proxy in ten seconds
Paste credentials into our free tester to confirm reachability, exit IP and latency before you debug your application.
A diagnosis order that works
- 1Reproduce with curl. Removes your application from the equation entirely.
- 2Hit an IP echo service through the proxy. If the exit IP comes back, the proxy layer is fine and the problem is with the target.
- 3Retry on a different exit. Distinguishes a flagged IP from a bad request shape.
- 4Compare against a browser on the same connection. If the browser succeeds where your client fails, your headers or TLS fingerprint are the difference.
- 5Check the response body, not just the status. Bot walls return plenty of 200s and informative 503s.
Log the status code, the exit IP, the target host and the timestamp on every request. Individual errors are rarely informative; the distribution across exits and hosts is where the answer lives.
Build retries in from the start. Transient 502s, 504s and occasional 429s are a normal part of running through real networks, and a scraper without backoff will look broken when it is merely impatient.
Frequently asked questions
What does 407 Proxy Authentication Required mean?
The proxy rejected your credentials or received none. Check for typos, confirm your plan is active, verify your IP is on the allowlist if you use IP authentication, and make sure your client actually supports proxy authentication.
Why am I getting 502 errors from my residential proxy?
Residential exits are real devices that can go offline mid-request, so occasional 502s are expected and should simply be retried on a new exit. A sustained rate above about 5% suggests sticky sessions held too long or a thin pool in your chosen location.
Is a 403 the proxy's fault or the website's?
The website's. A 403 means the request arrived and was refused. Retry the same request on a different exit: success means the previous IP was flagged, failure means your headers, cookies or TLS fingerprint are the problem.
How do I fix 429 Too Many Requests?
Slow down. Honour any Retry-After header, reduce requests per exit, and spread load across more exits. Retrying immediately on the same IP usually extends the penalty rather than clearing it.
Why does my proxy work in curl but not in my application?
Almost always credential handling or protocol mismatch. Some libraries ignore proxy credentials in the URL, some need SOCKS support installed separately, and some default to a different port than the one you configured.
What timeout should I use with residential proxies?
Longer than you would for a direct connection. Residential exits add roughly 200–400ms of round-trip before the target does any work, so allow at least 15–30 seconds in total and let retries handle the rest.
The seamless team runs residential, ISP and datacenter proxy infrastructure and writes these guides from day-to-day operational experience.
Ready to try seamless proxies?
Residential, ISP and datacenter proxies with no data expiry.
Browse PlansKeep reading
HTTP 403 Forbidden: What Causes It and How to Fix It
403 means the request arrived, was understood and was refused. Which layer refused it decides the fix — and rotating IPs is the right answer far less often than people assume.
TroubleshootingHTTP 429 Too Many Requests: How Rate Limits Work and How to Survive Them
429 is the one error that gets worse the harder you try. Read the headers, back off properly, and spread load across identities instead of hammering one.
Troubleshooting407 Proxy Authentication Required: Every Cause and Its Fix
The one proxy error that is entirely on your side of the connection — and the handful of clients that cause it even when your credentials are perfect.
