chore: updated documentation comment in ErrorCode enum and set protocol test timeout to 0
This commit is contained in:
parent
8fa0a5c88b
commit
21e3d465ca
2 changed files with 5 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue