PROD-89: Early auth/GUID failure detection#119
Open
AaronAgility wants to merge 4 commits intolatest-betafrom
Open
PROD-89: Early auth/GUID failure detection#119AaronAgility wants to merge 4 commits intolatest-betafrom
AaronAgility wants to merge 4 commits intolatest-betafrom
Conversation
…back When all GUIDs fail API key retrieval (HTTP 500), bail immediately with a clear error pointing to auth expiry or bad GUIDs. In the locale detection catch block, distinguish between auth problems (keys also failed) and transient issues, and stop silently falling back to en-us. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AaronAgility
commented
Mar 10, 2026
| console.log(ansiColors.red(` 1. Your authentication has expired — run 'agility login' to re-authenticate`)); | ||
| console.log(ansiColors.red(` 2. The GUID(s) are incorrect — verify your --sourceGuid / --targetGuid values`)); | ||
| console.log(ansiColors.red(` 3. Your account does not have access to these instances\n`)); | ||
| return false; |
Collaborator
Author
There was a problem hiding this comment.
kick out early, previously was cascading failures into SDK calls.
AaronAgility
commented
Mar 10, 2026
| // No explicit locales and auto-detect failed — can't safely assume en-us | ||
| console.log(ansiColors.red(`Error: Could not detect available locales and no --locale flag was provided.`)); | ||
| console.log(ansiColors.red(`Please specify locales explicitly with --locale (e.g., --locale en-us)\n`)); | ||
| return false; |
Collaborator
Author
There was a problem hiding this comment.
Previously we had a fallback into en-us, but if those locales don't exist, the sync cascades into failures.
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.
Summary
GetPreviewKey), the CLI now exits immediately with a clear error message instead of continuingen-usfallback that masked auth failures and caused confusing downstream errors like "Unable to retrieve sitemap"Before
After
Test plan
--locale en-uswhen locale auto-detect fails (but keys succeed) → should use specified locale