Repository navigation
fix(cli): Every 403 blames the API key, even when a firewall sent it - #1673
Merged
Merged
Conversation
Alex Pezzati (alex-pezzati)
force-pushed
the
alxp/cli-403-blames-api-key
branch
from
October 16, 2026 08:02
1059209 to
ce0b581
Compare
Alex Pezzati (alex-pezzati)
force-pushed
the
alxp/cli-403-blames-api-key
branch
from
October 16, 2026 08:35
ce0b581 to
9a06689
Compare
Alex Pezzati (alex-pezzati)
marked this pull request as ready for review
October 16, 2026 09:17
Goran Gajic (gorangajic)
approved these changes
Oct 16, 2026
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.
Overview of Changes
In Tester session
l0akd2vers1r8i5iz870923wocht, Google Cloud Armor blocked arunner.evaluateSnippetrequest with its HTML 403 page. The CLI told Tester to check its API key, which was fine, so Tester gave up and the session sat blocked for 15+ hours. The firewall rule itself is fixed in #2906 fix(cloud-armor): Tester's snippet on its own runner is rejected with HTTP 403. This PR fixes the message, so the next blocked request is not blamed on the key.Not changed here:
describeIdentityErrorstill says "API key is invalid or unauthorized" for any 403 on the identity check. That call has no request body for a content rule to match, but a firewall rule that blocks by IP or region would still get blamed on the key. This is a separate gap worth tracking.An empty 403 body, such as one whose read failed, is now read as a firewall block.
Fixes AGE-5827
Testing
describeErrors.test.tsadds a 403 with an HTML body, which failed before the fix. The existing "carries the server's reason" test covers a 403 with the API's JSON body.bun run typecheck bun run lint bun run format:check bun run knip bun run test bun run buildChecklist