How do I know the error came from Web Unlocker and not the target site?
Every Web Unlocker error carries anx-brd-error response header describing the failure. Most also carry a machine-readable code: x-brd-error-code for unlocker-level errors, or x-brd-err-code for proxy-level errors passed through. If x-brd-error is absent and you received a response, that response came from the target site itself, including its own error pages and its own 4xx/5xx statuses, which are delivered to you as-is.
Branch your logic on the code rather than on the message text, because messages carry request-specific details such as selectors, hostnames and timeout values.
Where does the error appear in each access mode?
The same error codes are returned in both access modes. What differs is where the HTTP status lives:
On the native proxy, country and session options move from JSON body parameters into username flags (for example
-country-us), but produce the same error codes.
The same failure, on the Direct API:
Direct API response
Native proxy response
Which headers carry the error code?
Two sets of error headers exist, by layer:
Both families can appear in either access mode. Responses with a
400, 403 or 407 status also carry an RFC9209 Proxy-Status header, whose details field repeats the proxy-level code (for example details="policy_20020: Bad Port used..."). The 502 unlock failures listed below do not carry that header.
Which errors clear on a retry?
Retrying is worth doing for errors caused by the peer or by the unlock attempt, because each request uses a different peer. Errors caused by a property of the target, or by your own request parameters, return the same result on every attempt.Error catalog
HTTP Error 400
A 400 means the request was refused before an unlock attempt was made, because the zone configuration or the request itself blocks it. These responses do not include anx-brd-debug header.
premium
feature_not_active
ub_bad_endpoint_robots
Request validation (Direct API only, real outer 400)
HTTP Error 401 (Direct API only)
API-key authentication happens before the request reaches the unlocker, so these return a real outer 401 with a plain-text body and nox-brd-* headers.
HTTP Error 403
Access is restricted by Bright Data policy. Most of these carry a proxy-level code inx-brd-err-code, documented in the proxy error catalog.
HTTP Error 407
Authentication against the proxy layer failed. On the native proxy this is the outer status, with a summary in the status reason phrase. On the Direct API the same407 appears in x-brd-status-code.
HTTP Error 429
sr_rate_limit
HTTP Error 502
A 502 means the unlock attempt itself failed. The reason is inx-brd-error-code.
reject_block
resolve_failed_*
http_status
expect_element
navigation_timeout
domcontentloaded_event_timeout
document_load_failed
net_err_cert_date_invalid
net_err_cert_common_name_invalid
net_err_cert_authority_invalid
net_err_closed
rate_limit
proxy_error
no_peers
HTTP Error 503
Service unavailable. A browser check failed or was not completed. A 503 served by the target site itself is delivered as-is, with nox-brd-error header.