Skip to content

Conversation

@valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Aug 17, 2025

Closes #

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

Greptile Summary

This PR updates the ERRORS.md documentation file to reflect a package reorganization within the Storybook codebase. The changes update import paths from the old @storybook/core-events/... format to the new storybook/internal/... format for error handling modules.

Specifically, the documentation now instructs developers to import:

  • Preview errors from storybook/internal/preview-errors
  • Manager errors from storybook/internal/server-errors (this appears to be incorrect)
  • Server errors from storybook/internal/server-errors

This change is part of Storybook's broader effort to better distinguish between public and internal APIs. The new storybook/internal/... paths clearly mark these error classes as internal APIs that shouldn't be consumed by external users, which is a more appropriate categorization since these are low-level error handling utilities primarily used within Storybook's own architecture.

The update ensures that developers working on Storybook internals or writing advanced integrations have the correct import paths for accessing these error classes, which are essential for proper error handling across the preview, manager, and server components of Storybook.

Confidence score: 2/5

  • This PR contains a critical documentation error that will mislead developers
  • Score reflects the presence of incorrect import path mapping that could cause confusion
  • Pay close attention to line 14 where manager errors are incorrectly mapped to server-errors path

@valentinpalkovic valentinpalkovic self-assigned this Aug 17, 2025
@valentinpalkovic valentinpalkovic added ci:docs Run the CI jobs for documentation checks only. documentation labels Aug 17, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

- Errors which occur in the manager part of Storybook (manager UI)
- e.g. Sidebar, addons, Storybook UI, Storybook router, etc.
- available in `@storybook/core-events/server-errors`
- available in `storybook/internal/server-errors`
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Manager errors should be available in storybook/internal/manager-errors, not server-errors. This is a copy-paste error that will confuse developers.

Suggested change
- available in `storybook/internal/server-errors`
- available in `storybook/internal/manager-errors`

@nx-cloud
Copy link

nx-cloud bot commented Aug 17, 2025

View your CI Pipeline Execution ↗ for commit 075d2ae

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 42s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-17 06:43:18 UTC

@github-actions github-actions bot added the Stale label Aug 29, 2025
@valentinpalkovic valentinpalkovic merged commit f0bdb40 into next Sep 22, 2025
12 of 17 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-storybook-error-class-documentation branch September 22, 2025 13:40
@github-actions github-actions bot mentioned this pull request Sep 22, 2025
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants