Exception: A2A::PushNotificationNotSupportedError

Inherits:
Error
  • Object
show all
Defined in:
lib/a2a/errors.rb

Overview

Client attempted to use push notification features but the server agent does not support them (i.e., AgentCard.capabilities.pushNotifications is false).

Instance Attribute Summary

Attributes inherited from Error

#code, #http_status

Instance Method Summary collapse

Methods inherited from Error

#to_h

Constructor Details

#initialize(message: "Push notifications are not supported") ⇒ PushNotificationNotSupportedError

Returns a new instance of PushNotificationNotSupportedError.



95
96
97
# File 'lib/a2a/errors.rb', line 95

def initialize(message: "Push notifications are not supported")
  super(message, code: -32003, http_status: 400)
end

Instance Method Details

#error_dataObject



99
100
101
102
103
104
105
# File 'lib/a2a/errors.rb', line 99

def error_data
  [{
    "@type"  => "type.googleapis.com/google.rpc.ErrorInfo",
    "reason" => "PUSH_NOTIFICATION_NOT_SUPPORTED",
    "domain" => "a2a-protocol.org",
  }]
end