Repository navigation
cli: add more precise auth failure messages to error / debug logs - #14992
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: e05eb4a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-743r9lbao.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-743r9lbao.vercel.sh/tarballs/vercel.tgz"
}
}
} |
Contributor
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 1 (3%)
Unaffected packages - 39 (98%)
Results
This comment is automatically generated based on the affected testing strategy |
ali-vercel
approved these changes
Feb 17, 2026
Merged
mehulkar
pushed a commit
that referenced
this pull request
Feb 17, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Patch Changes - Add more precise errors and debug messages for auth issues ([#14992](#14992)) - Add tracing when installing builders ([#15071](#15071)) - Use namespaced vc.builder span attributes (builder.name, builder.version, builder.dynamicallyInstalled) so they appear correctly in Datadog and don't conflict with reserved `version` tag ([#15078](#15078)) - non-interactive mode should allow scope argument ([#15077](#15077)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
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.
This PR adds more precise auth error messages to errors / debug logs
Before
Right now you can accidentally inject an env e.g.
VERCEL_TOKENwhich will lead to confusing error logs.After
Vercel CLI 50.15.1 ? Set up and deploy “~/Developer/vercel/rust-fluid”? yes + Error: The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.Vercel CLI 50.15.1 [debug] [2026-02-11T14:48:09.628Z] user supplied no target, defaulting to deploy [debug] [2026-02-11T14:48:09.643Z] Arrived at home directory [debug] [2026-02-11T14:48:09.659Z] Found git root via "git rev-parse --show-toplevel" - detected "/Users/ecklf/Developer/vercel/rust-fluid" as repo root ? Set up and deploy “~/Developer/vercel/rust-fluid”? yes [debug] [2026-02-11T14:48:11.040Z] Spinner invoked (Loading scopes…) with a 1000ms delay [debug] [2026-02-11T14:48:11.041Z] Using token from VERCEL_TOKEN environment variable, skipping token refresh. [debug] [2026-02-11T14:48:11.059Z] #1 → GET https://api.vercel.com/v2/user [debug] [2026-02-11T14:48:11.060Z] #2 → GET https://api.vercel.com/v1/teams (node:96529) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities. [debug] [2026-02-11T14:48:11.656Z] #1 ← 403 Forbidden: sfo1::m6m7m-1770821291563-86622a944cb1 [597ms] + Error: The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token. [debug] [2026-02-11T14:48:11.660Z] #2 ← 403 Forbidden: sfo1::mkct5-1770821291562-7589b64fc4b4 [600ms]Note
Low Risk Change
This PR improves error messages by tracking token source (flag vs env var) and displaying more specific error messages when authentication fails, with no changes to authentication logic or security controls.
tokenSourcefield to track whether token came from--tokenflag orVERCEL_TOKENenv varInvalidTokenerror class to display source-specific error messagesRisk assessment for commit e05eb4a.