Skip to content

Keep healthy CLI clusters available on regional proxy 403s - #108

Merged
rmorehig merged 2 commits into
mainfrom
rafa/regional-discovery-403
Nov 27, 2026
Merged

rmorehig merged 2 commits into
mainfrom
rafa/regional-discovery-403

Conversation

@rmorehig

@rmorehig rmorehig commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The CLI already returns healthy clusters when a private regional endpoint times out. If the same endpoint returns a proxy 403, it currently aborts the list. This change uses the RawTree JSON error code and message to identify an API denial. A proxy 403 leaves the deployment in unavailable_regions and allows healthy cluster operations to continue. A 401, a structured RawTree 403, or a total outage remains fatal.

The regression exercises the actual CLI with HTML, empty and single-field JSON responses, including a healthy table lookup. The candidate binary also listed two clusters and reported the unreachable region against production. Cargo formatting and the full CLI test suite passed. Strict Clippy reports existing warnings in untouched files.

Related issue RAW-643.


Note

Medium Risk
Changes how auth and regional HTTP failures are classified during multi-region discovery; misclassification could hide real access denials or abort too late.

Overview
Regional cluster discovery no longer aborts the whole command when a private deployment’s proxy returns a non-API HTTP 403 (HTML, empty body, or JSON without both error and message). Those responses are treated like other regional failures and show up in unavailable_regions while healthy regions still serve table list and similar commands.

Error formatting now reads RawTree’s error code plus message, and marks true API denials with an internal ApiResponseError type. Discovery only fails fast on 401 or 403 responses that match that structured API shape; 401, structured 403, and all-regions-down cases still error.

Integration tests cover proxy 403 variants and credential/total-outage behavior. Version 0.8.6.

Reviewed by Cursor Bugbot for commit b888272. Bugbot is set up for automated code reviews on this repo. Configure here.

@rmorehig
rmorehig marked this pull request as ready for review November 27, 2026 10:51
@rmorehig
rmorehig merged commit 33a6acc into main Nov 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant