Merged
Conversation
🦋 Changeset detectedLatest commit: abd7575 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
Author
EndangeredMassa
approved these changes
Aug 27, 2024
| import { getCommandName } from './pkg-name'; | ||
| import { type Output } from './output/create-output'; | ||
|
|
||
| export function printError(error: unknown, output: Output) { |
Contributor
There was a problem hiding this comment.
suggestion (soft-blocking): can we make to use this somewhere in this PR or a quick follow up?
I don't like adding unused code because it can sometimes stay that way.
| } else { | ||
| output.error(`Unexpected error. Please try again later. (${message})`); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
suggestion (soft-blocking): Can we add some tests for all of this behavior?
| error = new Error(error); | ||
| } | ||
|
|
||
| const apiError = error as APIError; |
Contributor
There was a problem hiding this comment.
suggestion (soft-blocking): Can we remove the type assertion and use type checking instead?
Merged
TooTallNate
pushed a commit
that referenced
this pull request
Sep 23, 2024
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 the packages will be published to npm automatically. 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 ## @vercel/[email protected] ### Patch Changes - Allow Node.js v22 behind env var feature flag ([#12159](#12159)) ## [email protected] ### Patch Changes - Change error printing to use standard Output methods ([#12010](#12010)) - Updated dependencies \[[`2dab096e952c25521bac2537039ed7ca15675095`](2dab096)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`2dab096e952c25521bac2537039ed7ca15675095`](2dab096)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`2dab096e952c25521bac2537039ed7ca15675095`](2dab096)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`2dab096e952c25521bac2537039ed7ca15675095`](2dab096)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Updated dependencies \[[`2dab096e952c25521bac2537039ed7ca15675095`](2dab096)]: - @vercel/[email protected]
Bonniemarie216
approved these changes
Sep 24, 2024
kodiakhq bot
pushed a commit
that referenced
this pull request
Sep 27, 2024
This PR standardizes most remaining `console.error(error())` invocations to use `output.error` instead. `handleError` is left unchanged in this PR because it's already addressed with the creation of `prettyError` in #12010. This PR alters a number of call signatures to pass `output` into the appropriate functions.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 3, 2025
Previously #12010 I created `printError` to begin changing the API of `handleError` to use `output` instead of directly using `console.error`. Since we're now importing a usable `output` object directly, `handleError` can be updated without changing its call signature. This PR moves the updates from `printError` into `handleError` and removes the now redundant `printError`.
QuietCraftsmanship
pushed a commit
to QuietCraftsmanship/Vercel
that referenced
this pull request
Jul 6, 2025
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 the packages will be published to npm automatically. 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 ## @vercel/[email protected] ### Patch Changes - Allow Node.js v22 behind env var feature flag ([#12159](vercel/vercel#12159)) ## [email protected] ### Patch Changes - Change error printing to use standard Output methods ([#12010](vercel/vercel#12010)) - Updated dependencies \[[`a2ca868b10f685d4e63aaf8325801606c4158759`](vercel/vercel@a2ca868)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`a2ca868b10f685d4e63aaf8325801606c4158759`](vercel/vercel@a2ca868)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`a2ca868b10f685d4e63aaf8325801606c4158759`](vercel/vercel@a2ca868)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`a2ca868b10f685d4e63aaf8325801606c4158759`](vercel/vercel@a2ca868)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Updated dependencies \[[`a2ca868b10f685d4e63aaf8325801606c4158759`](vercel/vercel@a2ca868)]: - @vercel/[email protected]
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 creates
printErrora refactored version ofhandleErrorthat usesOutputinstead ofconsole.error, and renames the function to better represent its use.handleErrordidn't do any error handling, only output, but didn't use the existing utilities inclient.outputto accomplish that. This PR also fixes a 7 year old bug where'Canceled'was never printed to users.