Package org.a2aproject.sdk.spec
Class VersionNotSupportedError
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.VersionNotSupportedError
- All Implemented Interfaces:
Serializable,Event
A2A Protocol error indicating that the A2A protocol version specified in the request
is not supported by the agent.
This error is returned when a client specifies a protocol version (via the A2A-Version service parameter) that the agent does not support. Agents should return this error when they cannot handle the requested protocol version.
Corresponds to A2A-specific error code -32009.
Usage example:
// In agent implementation
if (!isSupportedVersion(requestedVersion)) {
throw new VersionNotSupportedError(null,
"Protocol version " + requestedVersion + " is not supported", 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
-
VersionNotSupportedError
public VersionNotSupportedError(@Nullable Integer code, @Nullable String message, @Nullable Map<String, Object> details) Constructs an error when the requested protocol version is not supported.- Parameters:
code- the error code (defaults to -32009 if null)message- the error message (defaults to standard message if null)details- additional error details (optional)
-