From 21e3d465ca1e782932020d4ef5c5df2010467586 Mon Sep 17 00:00:00 2001 From: Sumitesh Naithani Date: Fri, 3 Jan 2025 06:59:01 +0530 Subject: [PATCH] chore: updated documentation comment in ErrorCode enum and set protocol test timeout to 0 --- src/shared/protocol.test.ts | 4 ++-- src/types.ts | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/shared/protocol.test.ts b/src/shared/protocol.test.ts index a56ced0d..9423a2a7 100644 --- a/src/shared/protocol.test.ts +++ b/src/shared/protocol.test.ts @@ -43,8 +43,8 @@ describe("protocol tests", () => { result: z.string(), }); await protocol.request(request, mockSchema, { - timeout: 100, - }); // Short timeout for test + timeout: 0, + }); } catch (error) { expect(error).toBeInstanceOf(McpError); if (error instanceof McpError) { diff --git a/src/types.ts b/src/types.ts index 8ebe8bf5..59b055a8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -100,13 +100,10 @@ export const JSONRPCResponseSchema = z .strict(); /** -* @author : Sumitesh Naithani -* @link : https://docs.trafficserver.apache.org/en/latest/developer-guide/jsonrpc/jsonrpc-node-errors.en.html#standard-errors -* @description : An incomplete set of error codes that may appear in JSON-RPC responses. -* @note : SDK-specific errors should use the server error range (-32000 to -32099), as per JSON-RPC 2.0 specification. -*/ + * Error codes defined by the JSON-RPC specification. + */ export enum ErrorCode { - // SDK error codes (using server error range) + // SDK error codes ConnectionClosed = -32000, RequestTimeout = -32001,