[cli] rename handleError to printError and remove default#12821
Merged
erikareads merged 3 commits intomainfrom Jan 3, 2025
Merged
[cli] rename handleError to printError and remove default#12821erikareads merged 3 commits intomainfrom
erikareads merged 3 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 872466c 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 |
TooTallNate
approved these changes
Jan 3, 2025
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 3, 2025
While working on #12821, I found that we had two import paths for `printError`, both `print-error.ts` and `error.ts` were exporting the function. This PR unifies all imports to come from `error.ts`.
Schniz
pushed a commit
that referenced
this pull request
Jan 7, 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 ## [email protected] ### Patch Changes - [cli] centralize printError import location ([#12823](#12823)) - [cli] remove double export of printError by moving printError to error.ts ([#12824](#12824)) - [cli] consolidate error constructors ([#12825](#12825)) - [cli] rename handleError to printError and remove default ([#12821](#12821)) ## @vercel/[email protected] ### Patch Changes - fix missing reference to `@vercel/functions` by bundling ([#12831](#12831)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship
pushed a commit
to QuietCraftsmanship/Vercel
that referenced
this pull request
Jul 6, 2025
While working on vercel/vercel#12821, I found that we had two import paths for `printError`, both `print-error.ts` and `error.ts` were exporting the function. This PR unifies all imports to come from `error.ts`.
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 ## [email protected] ### Patch Changes - [cli] centralize printError import location ([#12823](vercel/vercel#12823)) - [cli] remove double export of printError by moving printError to error.ts ([#12824](vercel/vercel#12824)) - [cli] consolidate error constructors ([#12825](vercel/vercel#12825)) - [cli] rename handleError to printError and remove default ([#12821](vercel/vercel#12821)) ## @vercel/[email protected] ### Patch Changes - fix missing reference to `@vercel/functions` by bundling ([#12831](vercel/vercel#12831)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
handleErrorfunction doesn't handle errors, it only prints human readable translations of those errors to users. This PR follows thehandleErrorupdate in #12817 and renameshandleErrortoprintErrorwhich better represents how the function is used.This PR also removes the
defaultexport, makingprintErroran explicit import everywhere it's used.