Package io.a2a.spec
Class PushNotificationNotSupportedError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.a2a.spec.A2AError
io.a2a.spec.A2AProtocolError
io.a2a.spec.PushNotificationNotSupportedError
- All Implemented Interfaces:
Event,Serializable
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
ConstructorsConstructorDescriptionConstructs error with default message.PushNotificationNotSupportedError(@Nullable Integer code, @Nullable String message, @Nullable Object data) Constructs error with all parameters. -
Method Summary
Methods inherited from class io.a2a.spec.A2AProtocolError
getUrlMethods 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 Object data) 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)data- additional error data (optional)
-