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

Telemetry: Ensure we report errors even when unexpected things happen #21416

Merged
merged 4 commits into from
Mar 6, 2023

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Mar 6, 2023

Closes #21318

What I did

  • Pass empty string if error.message is undefined (this happens with compilation errors):

Pasted Graphic 1

  • try/catch getting error level (this throws if main.js has syntax errors):

Pasted Graphic

How to test

  1. Run a sandbox for template, e.g. yarn task --task sandbox --start-from auto --template react-vite/default-ts
  2. Add syntax error to preview.js
  3. Run with STORYBOOK_TELEMETRY_DEBUG=1 yarn storybook

Also try - 2. add syntax error to main.js

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

code/lib/core-server/src/withTelemetry.ts Outdated Show resolved Hide resolved
@shilman shilman merged commit 8c035cf into next Mar 6, 2023
@shilman shilman deleted the tom/21318-fix-unreported-errors branch March 6, 2023 12:53
@shilman shilman mentioned this pull request Mar 6, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Thrown errors unreported
2 participants