Package org.a2aproject.sdk.spec
Class PushNotificationNotSupportedError
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.PushNotificationNotSupportedError
- All Implemented Interfaces:
Serializable,Event
A2A Protocol error indicating that the agent does not support push notifications.
This error is returned when a client attempts push notification operations
on an agent that has AgentCapabilities.pushNotifications() set to false.
Push notifications allow agents to proactively send task updates to clients via HTTP callbacks. Agents that don't support this capability will return this error for all push notification-related methods.
Corresponds to A2A-specific error code -32003.
Usage example:
if (!agentCard.capabilities().pushNotifications()) {
throw new PushNotificationNotSupportedError();
}
-
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
-
PushNotificationNotSupportedError
public PushNotificationNotSupportedError()Constructs error with default message. -
PushNotificationNotSupportedError
public PushNotificationNotSupportedError(@Nullable Integer code, @Nullable String message, @Nullable Map<String, Object> details) Constructs error with all parameters.- Parameters:
code- the error code (defaults to -32003 if null)message- the error message (defaults to "Push Notification is not supported" if null)details- additional error details (optional)
-