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

feat: expose user astro error #8012

Merged
merged 4 commits into from
Aug 11, 2023
Merged

feat: expose user astro error #8012

merged 4 commits into from
Aug 11, 2023

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Aug 9, 2023

Changes

Adds a new astro/errors module, where the user can import AstroUserError and use it as they see fit.

The class accepts a mandatory message and an optional hint.

Testing

N/A

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Aug 9, 2023

🦋 Changeset detected

Latest commit: 56f129b

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

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release labels Aug 9, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@ematipico ematipico marked this pull request as ready for review August 10, 2023 13:55
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this approach! But also would like to hear Erika's thoughts if AstroUserError is a suitable name for this.

Also wonder if it's worth aliasing AstroUserError to AstroError during entrypoint re-export to make the API cleaner, but I'm fine either way.

@Princesseuh
Copy link
Member

I think aliasing it to AstroError would be fine yeah

@ematipico ematipico merged commit 866ed40 into next Aug 11, 2023
13 checks passed
@ematipico ematipico deleted the feat/expose-astro-error branch August 11, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants