Class McpJsonRpcException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.soklet.McpJsonRpcException
- All Implemented Interfaces:
Serializable
Signals an intentional client-visible JSON-RPC error from an MCP handler.
Unexpected application failures should be allowed to propagate normally
so Soklet can map them to its safe internal-error response. A handler's
exception passes through McpHandlerContinuation.proceed() unchanged.
An McpHandlerInterceptor may inspect and rethrow that exact object
during the same invocation to preserve the intentional error, or return a
method-compatible recovery result. An interceptor-authored exception,
including a new instance carrying the same error, a wrapper, or an exception
retained from an earlier invocation, fails closed as an unexpected failure.
- Author:
- Mark Allen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMcpJsonRpcException(@NonNull McpJsonRpcError jsonRpcError) Creates an exception carrying an intentional JSON-RPC error. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
McpJsonRpcException
Creates an exception carrying an intentional JSON-RPC error.- Parameters:
jsonRpcError- client-visible JSON-RPC error
-
-
Method Details
-
getError
- Returns:
- client-visible JSON-RPC error
-