Skip to content

docs: Fix Solid, SolidStart, and NestJS README snippets - #24571

Open
nicohrubec wants to merge 1 commit into
developfrom
nh/fix-solid-solidstart-and-nestjs-readme-snippet-errors
Open

nicohrubec wants to merge 1 commit into
developfrom
nh/fix-solid-solidstart-and-nestjs-readme-snippet-errors

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Sep 21, 2026

Copy link
Copy Markdown
Member

Fix the Solid and SolidStart README examples to call the imported router wrapper, and remove the duplicate NestJS MonitorConfig import so the snippets use valid imports.

Closes #24548.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@nicohrubec
nicohrubec marked this pull request as ready for review September 21, 2026 16:29
@nicohrubec
nicohrubec requested a review from a team as a code owner September 21, 2026 16:29
@nicohrubec
nicohrubec requested review from chargome and s1gr1d and removed request for a team September 21, 2026 16:29
Comment thread packages/solid/README.md
});

const SentryRouter = Sentry.withSentryRouterRouting(Router);
const SentryRouter = withSentryRouterRouting(Router);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The @sentry/solid README example incorrectly calls withSentryRouterRouting as a method on the Sentry namespace, which will cause a runtime TypeError.
Severity: HIGH

Suggested Fix

Update the README example to call withSentryRouterRouting(Router) directly, and ensure the import statement correctly imports it as a named export from '@sentry/solid/solidrouter'.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/solid/README.md#L42

Potential issue: The example code in the `@sentry/solid` README for setting up router
integration demonstrates an incorrect usage of `withSentryRouterRouting`. It shows
`Sentry.withSentryRouterRouting(Router)`, but `withSentryRouterRouting` is a named
export from the `@sentry/solid/solidrouter` module, not a property on the `Sentry`
namespace object. Users copying this code snippet will encounter a `TypeError:
Sentry.withSentryRouterRouting is not a function` at runtime, preventing the integration
from working.

Did we get this right? 👍 / 👎 to inform future reviews.

Comment thread packages/nestjs/README.md
```typescript
import { Cron } from '@nestjs/schedule';
import { SentryCron, MonitorConfig } from '@sentry/nestjs';
import { SentryCron } from '@sentry/nestjs';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The @sentry/nestjs README example incorrectly imports MonitorConfig from @sentry/nestjs, which will cause a TypeScript compilation error.
Severity: MEDIUM

Suggested Fix

Remove MonitorConfig from the import statement from '@sentry/nestjs'. The correct type import from '@sentry/core' is already included in the code snippet.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/nestjs/README.md#L136

Potential issue: The code example in the `@sentry/nestjs` README includes
`MonitorConfig` in the import statement from `@sentry/nestjs`. However, `MonitorConfig`
is not a public export of the `@sentry/nestjs` package. TypeScript users who copy this
code snippet will encounter a compilation error because the type cannot be found in the
specified module. The correct import for this type is from `@sentry/core`, which is
already present in the example on the following line.

Did we get this right? 👍 / 👎 to inform future reviews.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Solid, SolidStart, and NestJS README snippet errors

1 participant