Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

erikareads
Copy link
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.

Copy link

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
171 checks passed
@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
## vercel@39.2.6

### 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/edge@1.2.1

### 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>
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.

None yet

2 participants