Enum Class McpErrorKind
- All Implemented Interfaces:
Serializable,Comparable<McpErrorKind>,Constable
Revision-neutral classification of a dispatch failure.
The core raises a kind; each revision maps kinds to its own JSON-RPC error codes via
McpRevision.errorCode(McpErrorKind). Several kinds legitimately map to the same code on a
given revision — the point of the enum is that the core never has to know which.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA handler threw an unexpected exception.A required parameter was missing, or a parameter had the wrong JSON shape.The JSON-RPC envelope itself was unusable (absent or emptymethod, null envelope).The request body could not be parsed as JSON.Aprompts/getnamed a prompt that is not registered.Aresources/readnamed a resource that is not registered.Atools/callnamed a tool that is not registered.The requested top-level JSON-RPC method is not implemented by this revision. -
Method Summary
Modifier and TypeMethodDescriptionstatic McpErrorKindReturns the enum constant of this class with the specified name.static McpErrorKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INVALID_REQUEST
The JSON-RPC envelope itself was unusable (absent or emptymethod, null envelope). -
UNKNOWN_METHOD
The requested top-level JSON-RPC method is not implemented by this revision. -
TOOL_NOT_FOUND
Atools/callnamed a tool that is not registered. -
PROMPT_NOT_FOUND
Aprompts/getnamed a prompt that is not registered. -
RESOURCE_NOT_FOUND
Aresources/readnamed a resource that is not registered. -
INVALID_PARAMS
A required parameter was missing, or a parameter had the wrong JSON shape. -
INTERNAL_ERROR
A handler threw an unexpected exception. -
PARSE_ERROR
The request body could not be parsed as JSON.No dispatch path raises this kind today — JSON parsing happens in the REST layer before dispatch is reached. The constant exists so a revision's code table is complete; that is not the same claim as the path being reachable.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-