Skip to content

Commit 61fef52

Browse files
committed
feat: add UnsupportedCapabilityError and update ErrorCode enum
1 parent 8a1b457 commit 61fef52

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/core/src/types/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ export enum ErrorCode {
238238
InternalError = -32603,
239239

240240
// MCP-specific error codes
241-
UrlElicitationRequired = -32042
241+
UrlElicitationRequired = -32042,
242+
UnsupportedCapability = -32043
242243
}
243244

244245
/**
@@ -2369,6 +2370,12 @@ export class UrlElicitationRequiredError extends McpError {
23692370
}
23702371
}
23712372

2373+
export class UnsupportedCapabilityError extends McpError {
2374+
constructor(message: string) {
2375+
super(ErrorCode.UnsupportedCapability, message);
2376+
}
2377+
}
2378+
23722379
type Primitive = string | number | boolean | bigint | null | undefined;
23732380
type Flatten<T> = T extends Primitive
23742381
? T

0 commit comments

Comments
 (0)