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

Add basic error reporting #3750

Merged
merged 1 commit into from
Jun 29, 2022
Merged

Add basic error reporting #3750

merged 1 commit into from
Jun 29, 2022

Conversation

FredKSchott
Copy link
Member

@FredKSchott FredKSchott commented Jun 28, 2022

Changes

  • Adds basic error reporting to telemetry
  • Inspired by TypeScript (their system is more complex, but this is a good step in that direction).
  • Adds four classes of basic errors, to start.
export enum AstroErrorCodes {
	// 1xxx: Astro Runtime Errors
	UnknownError = 1000,
	ConfigError = 1001,
	// 2xxx: Astro Compiler Errors
	UnknownCompilerError = 2000,
	UnknownCompilerCSSError = 2001,
}

Background

This is probably the feature I'm most excited about as an open source maintainer, for so many reasons!

  1. When a release goes out, we can find out immediately if it is broken (GitHub issues sometimes take hours or even days to find out)
  2. We can spot and fix bugs that users might not know to report
  3. When a GH issue does come in, we can get an immediate sense of how many users are impacted.

Testing

  • Tests added.

Docs

  • N/A

@changeset-bot
Copy link

changeset-bot bot commented Jun 28, 2022

🦋 Changeset detected

Latest commit: d1445f8

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

This PR includes changesets to release 10 packages
Name Type
astro Patch
@astrojs/telemetry Patch
@e2e/astro-component Patch
@e2e/lit-component Patch
@e2e/preact-component Patch
@e2e/react-component Patch
@e2e/solid-component Patch
@e2e/svelte-component Patch
@e2e/e2e-tailwindcss Patch
@e2e/ts-resolution 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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jun 28, 2022
@FredKSchott FredKSchott force-pushed the add-error-event branch 2 times, most recently from eb5cb79 to cc8e765 Compare June 28, 2022 17:17
@github-actions github-actions bot added the pkg: create-astro Related to the `create-astro` package (scope) label Jun 28, 2022
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Overall this is looking great! Had a few comments.

packages/astro/src/events/index.ts Show resolved Hide resolved
packages/astro/src/events/session.ts Show resolved Hide resolved
packages/telemetry/src/system-info.ts Show resolved Hide resolved
@FredKSchott FredKSchott force-pushed the add-error-event branch 2 times, most recently from 22304fd to 9b4c24a Compare June 29, 2022 04:31
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for kicking this off!

@FredKSchott FredKSchott merged commit dd176ca into main Jun 29, 2022
@FredKSchott FredKSchott deleted the add-error-event branch June 29, 2022 21:54
@astrobot-houston astrobot-houston mentioned this pull request Jun 29, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
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) pkg: create-astro Related to the `create-astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants