Document proxy error codes and the X-Kernel-Proxy-Error header - #610
Conversation
The proxy layer sets a typed code on every branded error response and the error page tells automation clients to read it, but neither the header nor the codes were published. Adds a Proxy Errors page listing all eleven codes with retry guidance, and a recovery pattern for sessions a person is driving, where nothing re-navigates on their behalf. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
The .gov path replaces the generic retry guidance with creating and checking a compatible residential proxy, so the retry column now says so. Telemetry does not carry every header code: origin_response_incomplete is not collected, and unrecognized values arrive as unknown with the original in raw_code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Risk Assessment: Very Low
Re-evaluated from the current diff (head 94d949ee). Risk is unchanged.
Changed files (2):
proxies/errors.mdx— new Mintlify page documentingX-Kernel-Proxy-Errorcodes, retry guidance, a non-executed TypeScript example, and a telemetry notedocs.json— adds theproxies/errorssidebar entry under the existing Proxies group
Why Very Low
- Documentation and nav config only; no application, API, auth, billing, or infrastructure code
- No shared runtime systems or production logic
- Small, easy-to-reason-about surface (static MDX + one nav string)
- This is product docs, not model/prompt instruction files
- No
CODEOWNERSfile in the repo, so codeowner review is not required by that mechanism
This automation already approved the current head. Approval stands; not re-approving.
Sent by Cursor Automation: Assign PR reviewers
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 94d949e. Configure here.
| | `upstream_connect_failed` | The connection to the destination failed. | Yes | | ||
| | `upstream_dns_failure` | The upstream proxy host could not be resolved. | Yes | | ||
| | `origin_tls_timeout` | The proxy reached the destination, but the destination did not complete its TLS handshake in time. | Yes | | ||
| | `restricted_route_unavailable` | The destination requires a specialized egress route and Kernel could not build one. Kernel will not fall back to a provider known to reject the destination. | Yes, except on `.gov` destinations. There, create a new residential proxy with no targeting, country-only targeting, or a U.S. state, confirm it with [`POST /proxies/{id}/check`](https://kernel.sh/docs/api-reference/proxies/check-proxy-health), then use it for the session. | |
There was a problem hiding this comment.
Gov recovery restates canonical guidance
Low Severity
The restricted_route_unavailable retry cell restates residential .gov targeting rules and the proxy health-check procedure rather than linking to those canonical pages. The inlined check also omits a .gov URL.
Triggered by learned rule: Single source of truth — no deep content duplication across pages
Reviewed by Cursor Bugbot for commit 94d949e. Configure here.




Summary
The egress proxy sets
X-Kernel-Proxy-Errorto a typed code on every branded proxy-layer error response, and the error page itself instructs automation clients to read that header. Neither the header nor the codes appeared anywhere in the docs, so anyone building recovery on them had nothing to work from.Adds
proxies/errors.mdxcovering:X-Kernel-Proxy-Errorheader, and that the status is always502including for timeouts — so the header, not the status, is the signal.proxy_errorbrowser telemetry for after-the-fact attribution.origin_response_incompleteis deliberately excluded from the retryable set in the example, since the destination may already have acted on the request.Testing
mint broken-linkspasses locally, which is what CI runs.🤖 Generated with Claude Code
Note
Low Risk
Documentation and navigation only; no runtime, API, or auth changes.
Overview
Adds a Proxy Errors doc under the Proxies nav and links it from
docs.json.The new page documents
X-Kernel-Proxy-Error: branded proxy-layer failures always return502, so clients should use the header (not status) to classify errors—including WebSocket and subresource responses where the error page never shows.It lists eleven typed codes with meaning and retry guidance, a TypeScript navigation retry pattern for live-view / human-driven sessions (with
origin_response_incompleteexcluded from auto-retry), and howproxy_errortelemetry relates to the header (including gaps likeunknown/raw_code).Reviewed by Cursor Bugbot for commit 94d949e. Bugbot is set up for automated code reviews on this repo. Configure here.