Package io.a2a.spec
Class MethodNotFoundError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.a2a.spec.A2AError
io.a2a.spec.MethodNotFoundError
- All Implemented Interfaces:
Event,Serializable
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
ConstructorsConstructorDescriptionConstructs error with default message.MethodNotFoundError(@Nullable Integer code, @Nullable String message, @Nullable Object data) Constructs error with all parameters. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MethodNotFoundError
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)data- additional error data (optional)
-
MethodNotFoundError
public MethodNotFoundError()Constructs error with default message.
-