Package org.a2aproject.sdk.spec
Class MethodNotFoundError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.a2aproject.sdk.spec.A2AError
org.a2aproject.sdk.spec.MethodNotFoundError
- All Implemented Interfaces:
Serializable,Event
JSON-RPC error indicating that the requested method does not exist or is not available.
This error is returned when a client attempts to invoke a JSON-RPC method that is not implemented by the agent. In the A2A Protocol context, this typically means calling an unsupported protocol method.
Corresponds to JSON-RPC 2.0 error code -32601.
Usage example:
// Standard error for unknown method
throw new MethodNotFoundError();
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.a2aproject.sdk.spec.A2AError
getCode, getDetailsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MethodNotFoundError
public MethodNotFoundError(@Nullable Integer code, @Nullable String message, @Nullable Map<String, Object> details) Constructs error with all parameters.- Parameters:
code- the error code (defaults to -32601 if null)message- the error message (defaults to "Method not found" if null)details- additional error details (optional)
-
MethodNotFoundError
public MethodNotFoundError()Constructs error with default message.
-