Repository navigation
Keep healthy CLI clusters available on regional proxy 403s - #108
Merged
Merged
Conversation
rmorehig
marked this pull request as ready for review
November 27, 2026 10:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
errorandmessage). Those responses are treated like other regional failures and show up inunavailable_regionswhile healthy regions still servetable listand similar commands.Error formatting now reads RawTree’s
errorcode plusmessage, and marks true API denials with an internalApiResponseErrortype. 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.