King Star
cab669b108
fix: classify malformed request params as invalid params (#886)
## Summary
Classify typed request deserialization failures as JSON-RPC `Invalid
Params`
instead of `Internal error`.
Fixes #830.
## Changes
- translate `SerializationException` from typed request decoding to
`-32602`
- return a stable `Invalid params` message without serialization
internals
- cover malformed `initialize` requests through session and Streamable
HTTP paths
## Scope and risk
The catch is limited to request parameter deserialization after the
JSON-RPC
method has been resolved. Envelope parsing, unknown methods, handler
failures,
and successful requests keep their existing behavior.
## Verification
```bash
./gradlew :integration-test:jvmTest --tests 'io.modelcontextprotocol.kotlin.sdk.server.ServerSessionInitializeTest'
./gradlew :kotlin-sdk-server:jvmTest --tests 'io.modelcontextprotocol.kotlin.sdk.server.StreamableHttpServerTransportTest'
./gradlew :kotlin-sdk-core:jvmTest --tests 'io.modelcontextprotocol.kotlin.sdk.shared.ProtocolTest'
./gradlew ktlintCheck apiCheck
```
Co-authored-by: Pavel Gorgulov <devcrocod@gmail.com>
|
2026-07-22 18:12:12 +02:00 |
| .. |
|
commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk
|
fix: classify malformed request params as invalid params (#886)
|
2026-07-22 18:12:12 +02:00 |
|
commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk
|
feat(core): concurrent inbound dispatch behind an initialization gate (#884)
|
2026-07-15 12:33:29 +02:00 |
|
jsMain/kotlin/io/modelcontextprotocol/kotlin/sdk
|
feat: #502 resource templates with basic template matcher (#606)
|
2026-03-19 12:30:22 +02:00 |
|
jvmMain/kotlin/io/modelcontextprotocol/kotlin/sdk
|
feat(docs): public api kdocs (#658)
|
2026-04-02 14:41:48 +02:00 |
|
jvmTest
|
feat(core): concurrent inbound dispatch behind an initialization gate (#884)
|
2026-07-15 12:33:29 +02:00 |
|
nativeMain/kotlin/io/modelcontextprotocol/kotlin/sdk
|
feat: #502 resource templates with basic template matcher (#606)
|
2026-03-19 12:30:22 +02:00 |
|
wasmJsMain/kotlin/io/modelcontextprotocol/kotlin/sdk
|
feat: #502 resource templates with basic template matcher (#606)
|
2026-03-19 12:30:22 +02:00 |