Package org.a2aproject.sdk.spec
Class A2AClientInvalidArgsError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.a2aproject.sdk.spec.A2AClientError
org.a2aproject.sdk.spec.A2AClientInvalidArgsError
- All Implemented Interfaces:
Serializable
Client exception indicating invalid arguments provided to a client operation.
This exception is thrown when parameters passed to A2A client SDK methods fail
validation. This is distinct from InvalidParamsError, which represents
server-side parameter validation errors.
Common scenarios:
- Null values for required parameters
- Invalid parameter combinations
- Parameter values outside acceptable ranges
- Malformed URIs or identifiers
Usage example:
if (agentUrl == null || agentUrl.isEmpty()) {
throw new A2AClientInvalidArgsError("agentUrl cannot be null or empty");
}
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new invalid arguments error with no message.A2AClientInvalidArgsError(String message) Creates a new invalid arguments error with the specified message.A2AClientInvalidArgsError(String message, Throwable cause) Creates a new invalid arguments error with the specified message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
A2AClientInvalidArgsError
public A2AClientInvalidArgsError()Creates a new invalid arguments error with no message. -
A2AClientInvalidArgsError
Creates a new invalid arguments error with the specified message.- Parameters:
message- the error message
-
A2AClientInvalidArgsError
Creates a new invalid arguments error with the specified message and cause.- Parameters:
message- the error messagecause- the underlying cause
-