Skip to content

[cli] rename handleError to printError and remove default#12821

Merged
erikareads merged 3 commits intomainfrom
erikarowland/rename-handle-error-to-print-error
Jan 3, 2025
Merged

[cli] rename handleError to printError and remove default#12821
erikareads merged 3 commits intomainfrom
erikarowland/rename-handle-error-to-print-error

Conversation

@erikareads
Copy link
Copy Markdown
Contributor

@erikareads erikareads commented 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.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 3, 2025

🦋 Changeset detected

Latest commit: 872466c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

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

@erikareads erikareads added this pull request to the merge queue Jan 3, 2025
Merged via the queue into main with commit 7a388e1 Jan 3, 2025
@erikareads erikareads deleted the erikarowland/rename-handle-error-to-print-error branch January 3, 2025 19:40
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants