Class MethodNotFoundError

All Implemented Interfaces:
Serializable, Event

public class MethodNotFoundError extends A2AError
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 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.