Class UnsupportedOperationError

All Implemented Interfaces:
Serializable, Event

public class UnsupportedOperationError extends A2AProtocolError
A2A Protocol error indicating that the requested operation is not supported by the agent.

This error is returned when a client attempts an operation that is valid according to the A2A Protocol but not implemented or enabled by the specific agent. This is distinct from MethodNotFoundError, which indicates an unknown JSON-RPC method.

Common scenarios:

Corresponds to A2A-specific error code -32004.

Usage example:


 if (!agentCard.capabilities().streaming()) {
     throw new UnsupportedOperationError();
 }
 
See Also:
  • Constructor Details

    • UnsupportedOperationError

      public UnsupportedOperationError(@Nullable Integer code, @Nullable String message, @Nullable Map<String,Object> details)
      Constructs error with all parameters.
      Parameters:
      code - the error code (defaults to -32004 if null)
      message - the error message (defaults to "This operation is not supported" if null)
      details - additional error details (optional)
    • UnsupportedOperationError

      public UnsupportedOperationError()
      Constructs error with default message.