Exception: A2A::Internal::Errors::PushNotificationConfigNotFoundError
- Inherits:
-
Error
- Object
- StandardError
- Error
- A2A::Internal::Errors::PushNotificationConfigNotFoundError
- Defined in:
- lib/a2a/errors.rb
Overview
Raised when a specific push notification config cannot be found by ID. This is an implementation detail — the spec does not define this error.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #error_data ⇒ Object
-
#initialize(task_id, config_id, message: "Push notification config not found") ⇒ PushNotificationConfigNotFoundError
constructor
A new instance of PushNotificationConfigNotFoundError.
Methods inherited from Error
Constructor Details
#initialize(task_id, config_id, message: "Push notification config not found") ⇒ PushNotificationConfigNotFoundError
Returns a new instance of PushNotificationConfigNotFoundError.
241 242 243 244 245 |
# File 'lib/a2a/errors.rb', line 241 def initialize(task_id, config_id, message: "Push notification config not found") @task_id = task_id @config_id = config_id super(, code: -32001, http_status: 404) end |
Instance Method Details
#error_data ⇒ Object
247 248 249 250 251 252 253 254 |
# File 'lib/a2a/errors.rb', line 247 def error_data [{ "@type" => "type.googleapis.com/google.rpc.ErrorInfo", "reason" => "TASK_NOT_FOUND", "domain" => "a2a-protocol.org", "metadata" => { "taskId" => @task_id.to_s, "configId" => @config_id.to_s }, }] end |