We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3d39ca6 + a8b61c3 commit 9b4c949Copy full SHA for 9b4c949
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "@modelcontextprotocol/sdk",
3
- "version": "0.1.0",
+ "version": "0.1.1",
4
"description": "Model Context Protocol implementation for TypeScript",
5
"type": "module",
6
"main": "./dist/index.js",
src/shared/protocol.ts
@@ -180,8 +180,8 @@ export class Protocol<
180
jsonrpc: "2.0",
181
id: request.id,
182
error: {
183
- code: error["code"]
184
- ? Math.floor(Number(error["code"]))
+ code: Number.isSafeInteger(error["code"])
+ ? error["code"]
185
: ErrorCode.InternalError,
186
message: error.message ?? "Internal error",
187
},
0 commit comments