Skip to content

Conversation

@ia319
Copy link
Member

@ia319 ia319 commented Nov 6, 2025

Closes #32951

What I did

The error disappears and the page works normally.

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 publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Removed noisy error logging from documentation preview processing; when a preview transformation fails, the original content is returned silently. No user-visible behavior changes besides reduced console noise.

✏️ Tip: You can customize this high-level summary in your review settings.

@nx-cloud
Copy link

nx-cloud bot commented Nov 6, 2025

View your CI Pipeline Execution ↗ for commit 324b069


☁️ Nx Cloud last updated this comment at 2025-12-10 06:39:34 UTC

@valentinpalkovic valentinpalkovic changed the title fix(docs): fix syntax error when parse object-form code snippets with Prettier Build: Fix syntax error when parse object-form code snippets with Prettier Nov 10, 2025
@valentinpalkovic valentinpalkovic self-assigned this Nov 10, 2025
@valentinpalkovic valentinpalkovic added build Internal-facing build tooling & test updates ci:normal labels Nov 10, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

📝 Walkthrough

Walkthrough

Removed a console.error call from the catch block in Storybook preview transform; the catch now returns the original source without logging errors. No other logic or public API changes.

Changes

Cohort / File(s) Summary
Storybook Preview: error handling tweak
code/.storybook/preview.tsx
Removed console.error(error) from the transform catch block so errors are no longer logged; the catch returns the original source unchanged. No other functional changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single-file, minor change (logging removal).
  • Review focus: ensure silent failure is intended and no tests rely on the console output.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d5e94b and 324b069.

📒 Files selected for processing (1)
  • code/.storybook/preview.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • code/.storybook/preview.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: normal
  • GitHub Check: Core Unit Tests, windows-latest

Comment @coderabbitai help to get the list of available commands and usage tips.

@storybook-app-bot
Copy link

storybook-app-bot bot commented Nov 10, 2025

Package Benchmarks

Commit: 324b069, ran on 10 December 2025 at 06:50:45 UTC

No significant changes detected, all good. 👏

@github-actions github-actions bot added the Stale label Nov 26, 2025
@valentinpalkovic
Copy link
Contributor

Hi @ia319

We should use a try/catch as Kasper suggested instead. If code cannot be formatted, it should not throw an error.

@ia319
Copy link
Member Author

ia319 commented Dec 2, 2025

Hi @ia319

We should use a try/catch as Kasper suggested instead. If code cannot be formatted, it should not throw an error.

Do you mean that simply removing console.error(error); would be enough?

@valentinpalkovic
Copy link
Contributor

Hi @ia319
We should use a try/catch as Kasper suggested instead. If code cannot be formatted, it should not throw an error.

Do you mean that simply removing console.error(error); would be enough?

Exactly

@ia319
Copy link
Member Author

ia319 commented Dec 10, 2025

Exactly

Thank you for the response; I have made the changes.

@valentinpalkovic valentinpalkovic merged commit 53a9799 into storybookjs:next Dec 10, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal needs triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SB10 internal codebase console error on components autodocs

2 participants