Repository navigation
v2 backwards compat: SdkError status code - #2049
Merged
Merged
Claude / Claude Code Review
completed
May 11, 2026 in 14m 11s
Code review found 3 potential issues
Found 7 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 3 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | packages/core/src/errors/sdkErrors.ts:86-93 |
SdkHttpError @example is inline, not sourced from .examples.ts |
| 🟡 Nit | packages/client/test/client/streamableHttp.test.ts:2 |
Unused SdkError import left in three test files |
| 🟡 Nit | packages/core/src/exports/public/index.ts:16-17 |
Missing changeset for new public API export |
Annotations
Check warning on line 93 in packages/core/src/errors/sdkErrors.ts
claude / Claude Code Review
SdkHttpError @example is inline, not sourced from .examples.ts
nit: Per CLAUDE.md § "JSDoc `@example` Code Snippets", `@example` blocks should pull type-checked code from a companion `.examples.ts` file via a `source=` fence — the sibling `SdkError` JSDoc just above (line 47) already does this with `source="./sdkErrors.examples.ts#SdkError_basicUsage"`. Consider adding an `SdkHttpError_basicUsage` region to `sdkErrors.examples.ts` and referencing it here so the snippet is type-checked and kept in sync by `pnpm sync:snippets`.
Check warning on line 2 in packages/client/test/client/streamableHttp.test.ts
claude / Claude Code Review
Unused SdkError import left in three test files
nit: `SdkError` is imported here but no longer referenced after the assertions migrated to `SdkHttpError` — same in `sse.test.ts:6` and `tokenProvider.test.ts:5`. Drop it from all three import lists (and optionally update the two test-name strings that still say "throws SdkError" to say `SdkHttpError`).
Check warning on line 17 in packages/core/src/exports/public/index.ts
claude / Claude Code Review
Missing changeset for new public API export
This PR adds `SdkHttpError` and `SdkHttpErrorData` to the curated public API surface but doesn't include a changeset (the changeset-bot has already flagged this). Since this is an intentional new-feature export re-exported by `@modelcontextprotocol/client` and `@modelcontextprotocol/server`, please add a `minor` changeset for `@modelcontextprotocol/core` and `@modelcontextprotocol/client` so consumers get a version bump and changelog entry — `pnpm changeset` will generate one.
Loading