Package org.a2aproject.sdk.spec
Class ExtensionSupportRequiredError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.a2aproject.sdk.spec.A2AError
org.a2aproject.sdk.spec.A2AProtocolError
org.a2aproject.sdk.spec.ExtensionSupportRequiredError
- All Implemented Interfaces:
Serializable,Event
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);
}
-
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
-
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)
-