[cli] update handleError to use output utilities#12817
Merged
erikareads merged 5 commits intomainfrom Jan 3, 2025
Merged
Conversation
🦋 Changeset detectedLatest commit: 8b61233 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
reviewed
Jan 2, 2025
| import output from '../output-manager'; | ||
|
|
||
| export function printError(error: unknown) { | ||
| export default function handleError(error: unknown) { |
Member
There was a problem hiding this comment.
Can we drop the default while we're at it?
Contributor
Author
There was a problem hiding this comment.
I'm going to do a fast-follow PR renaming handleError to printError since that better represents what the function does, since I'm going to need to change imports on that PR anyway, it'll be easier to drop default on that PR.
TooTallNate
approved these changes
Jan 3, 2025
Merged
TooTallNate
pushed a commit
that referenced
this pull request
Jan 3, 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 - Revert build utils refactor ([#12818](#12818)) ## [email protected] ### Patch Changes - [cli] update handleError to use output utilities ([#12817](#12817)) - Fix bug where when page doesn't postpone it still generates a correct fallback ([#12811](#12811)) - Updated dependencies \[[`4cb6143887f36060e9e4fa5866aa97a6af25b6ae`](4cb6143), [`e570a1660c2b18a41d8c3985e645a175a44a5ea4`](e570a16), [`2a59669c70b65fd01f755c8fd646e08619ebee3d`](2a59669), [`9d6fb57d5659f1b8d38fea5ff3d54f8efb8bc5f4`](9d6fb57)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`e570a1660c2b18a41d8c3985e645a175a44a5ea4`](e570a16)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`e570a1660c2b18a41d8c3985e645a175a44a5ea4`](e570a16)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Revert build utils refactor ([#12818](#12818)) ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](#12109)) - Revert build utils refactor ([#12818](#12818)) - Fix bug where when page doesn't postpone it still generates a correct fallback ([#12811](#12811)) ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](#12109)) - Updated dependencies \[[`e570a1660c2b18a41d8c3985e645a175a44a5ea4`](e570a16)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](#12109)) - Revert build utils refactor ([#12818](#12818)) ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](#12109)) - Revert build utils refactor ([#12818](#12818)) - Update `@remix-run/dev` fork to v2.15.2 ([#12796](#12796)) ## @vercel/[email protected] ### Patch Changes - Revert build utils refactor ([#12818](#12818)) - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Updated dependencies \[[`e570a1660c2b18a41d8c3985e645a175a44a5ea4`](e570a16)]: - @vercel/[email protected]
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 3, 2025
The `handleError` function doesn't handle errors, it only prints human readable translations of those errors to users. This PR follows the `handleError` update in #12817 and renames `handleError` to `printError` which better represents how the function is used. This PR also removes the `default` export, making `printError` an explicit import everywhere it's used.
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 - Revert build utils refactor ([#12818](vercel/vercel#12818)) ## [email protected] ### Patch Changes - [cli] update handleError to use output utilities ([#12817](vercel/vercel#12817)) - Fix bug where when page doesn't postpone it still generates a correct fallback ([#12811](vercel/vercel#12811)) - Updated dependencies \[[`7c0d843af8134b889b545f29ecfbf47601f789d0`](vercel/vercel@7c0d843), [`7163a6331f365c345f3edb64afdbc06a2bb3571d`](vercel/vercel@7163a63), [`e04da5eda571c676c900442579e27b250111e61a`](vercel/vercel@e04da5e), [`7c4ef393456175e2c3e7432b64675c433950a352`](vercel/vercel@7c4ef39)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`7163a6331f365c345f3edb64afdbc06a2bb3571d`](vercel/vercel@7163a63)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`7163a6331f365c345f3edb64afdbc06a2bb3571d`](vercel/vercel@7163a63)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Revert build utils refactor ([#12818](vercel/vercel#12818)) ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](vercel/vercel#12109)) - Revert build utils refactor ([#12818](vercel/vercel#12818)) - Fix bug where when page doesn't postpone it still generates a correct fallback ([#12811](vercel/vercel#12811)) ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](vercel/vercel#12109)) - Updated dependencies \[[`7163a6331f365c345f3edb64afdbc06a2bb3571d`](vercel/vercel@7163a63)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](vercel/vercel#12109)) - Revert build utils refactor ([#12818](vercel/vercel#12818)) ## @vercel/[email protected] ### Patch Changes - Upgrade @vercel/nft to 0.27.10 ([#12109](vercel/vercel#12109)) - Revert build utils refactor ([#12818](vercel/vercel#12818)) - Update `@remix-run/dev` fork to v2.15.2 ([#12796](vercel/vercel#12796)) ## @vercel/[email protected] ### Patch Changes - Revert build utils refactor ([#12818](vercel/vercel#12818)) - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Updated dependencies \[[`7163a6331f365c345f3edb64afdbc06a2bb3571d`](vercel/vercel@7163a63)]: - @vercel/[email protected]
QuietCraftsmanship
pushed a commit
to QuietCraftsmanship/Vercel
that referenced
this pull request
Jul 6, 2025
The `handleError` function doesn't handle errors, it only prints human readable translations of those errors to users. This PR follows the `handleError` update in vercel/vercel#12817 and renames `handleError` to `printError` which better represents how the function is used. This PR also removes the `default` export, making `printError` an explicit import everywhere it's used.
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.
Previously #12010 I created
printErrorto begin changing the API ofhandleErrorto useoutputinstead of directly usingconsole.error. Since we're now importing a usableoutputobject directly,handleErrorcan be updated without changing its call signature. This PR moves the updates fromprintErrorintohandleErrorand removes the now redundantprintError.