Skip to content

fix: response result-schema mismatch throws SdkError(InvalidResult) i…

614dbe8
Select commit
Loading
Failed to load commit list.
Merged

feat(core): custom-method support (3-arg setRequestHandler + request schema overload) #1974

fix: response result-schema mismatch throws SdkError(InvalidResult) i…
614dbe8
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 29, 2026 in 8m 27s

Code review found 1 potential issue

Found 5 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit packages/core/src/errors/sdkErrors.ts:29-30 SdkErrorCode.InvalidResult missing from migration docs' SdkErrorCode enumerations

Annotations

Check warning on line 30 in packages/core/src/errors/sdkErrors.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

SdkErrorCode.InvalidResult missing from migration docs' SdkErrorCode enumerations

Nit: `SdkErrorCode.InvalidResult` (added in 614dbe8) is missing from the migration-guide enumerations — `docs/migration-SKILL.md`'s "New `SdkErrorCode` enum values:" bullet list and `docs/migration.md`'s "New `SdkErrorCode` enum" table both stop at `SendFailed` → `ClientHttp*`. Consider adding an `InvalidResult = 'INVALID_RESULT'` row to each, and optionally a "Response result fails schema validation → `SdkError(InvalidResult)`" row to the §5 error-scenario table (v1 surfaced a raw `ZodError` he