Skip to content

Commit 21e3d46

Browse files
committed
chore: updated documentation comment in ErrorCode enum and set protocol test timeout to 0
1 parent 8fa0a5c commit 21e3d46

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/shared/protocol.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ describe("protocol tests", () => {
4343
result: z.string(),
4444
});
4545
await protocol.request(request, mockSchema, {
46-
timeout: 100,
47-
}); // Short timeout for test
46+
timeout: 0,
47+
});
4848
} catch (error) {
4949
expect(error).toBeInstanceOf(McpError);
5050
if (error instanceof McpError) {

src/types.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,10 @@ export const JSONRPCResponseSchema = z
100100
.strict();
101101

102102
/**
103-
* @author : Sumitesh Naithani
104-
* @link : https://docs.trafficserver.apache.org/en/latest/developer-guide/jsonrpc/jsonrpc-node-errors.en.html#standard-errors
105-
* @description : An incomplete set of error codes that may appear in JSON-RPC responses.
106-
* @note : SDK-specific errors should use the server error range (-32000 to -32099), as per JSON-RPC 2.0 specification.
107-
*/
103+
* Error codes defined by the JSON-RPC specification.
104+
*/
108105
export enum ErrorCode {
109-
// SDK error codes (using server error range)
106+
// SDK error codes
110107
ConnectionClosed = -32000,
111108
RequestTimeout = -32001,
112109

0 commit comments

Comments
 (0)