Class PushNotificationNotSupportedError

All Implemented Interfaces:
Serializable, Event

public class PushNotificationNotSupportedError extends A2AProtocolError
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();
 }
 
See Also:
  • 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)