X-Kernel-Proxy-Error response header to a typed code.
The header is set on every branded proxy-layer error response, including WebSocket and subresource requests where the page body never renders. The status is always 502, including for timeouts, so use the header rather than the status to decide what went wrong.
Error codes
Recovering from a proxy error
An agent driving the browser usually recovers on its own, because a failed step leads it to re-navigate. When a person is driving the browser instead — for example through an embedded live view — nobody re-navigates, and a transient provider failure becomes a dead end. Read the header on a502 and retry the navigation so those failures never reach the person holding the browser:
Typescript/Javascript
origin_response_incomplete is deliberately absent from that set. The destination may have already acted on the request, so retrying it automatically can duplicate a submission.
Observing proxy errors after the fact
Proxy failures are also reported asproxy_error browser telemetry events in the network category. Use the header to recover in the moment, and telemetry to attribute failures per session and per URL afterwards.
The telemetry code does not cover every code above. origin_response_incomplete is not reported as a proxy_error event, and a header value the browser image does not recognize is reported as unknown, with the original value in raw_code. Read the header when you need the exact code.