Class ExtensionSupportRequiredError

All Implemented Interfaces:
Serializable, Event

public class ExtensionSupportRequiredError extends A2AProtocolError
A2A Protocol error indicating that a client requested use of an extension marked as required but did not declare support for it.

This error is returned when a client attempts to use a feature or capability that requires a specific extension, but the client has not declared support for that extension in the request. Extensions marked as required: true in the Agent Card must be explicitly supported by the client.

Corresponds to A2A-specific error code -32008.

Usage example:


 // In agent implementation
 if (requiredExtension && !clientSupportsExtension) {
     throw new ExtensionSupportRequiredError(null,
         "Extension 'custom-auth' is required but not supported by client", null);
 }
 
See Also:
  • Constructor Details

    • ExtensionSupportRequiredError

      public ExtensionSupportRequiredError(@Nullable Integer code, @Nullable String message, @Nullable Map<String,Object> details)
      Constructs an error when a client requests a required extension without declaring support.
      Parameters:
      code - the error code (defaults to -32008 if null)
      message - the error message (defaults to standard message if null)
      details - additional error details (optional)