Exception: A2A::TaskNotFoundError
- Defined in:
- lib/a2a/errors.rb
Overview
The specified task ID does not correspond to an existing or accessible task. It might be invalid, expired, or already completed and purged.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #error_data ⇒ Object
-
#initialize(task_id, message: "Task not found") ⇒ TaskNotFoundError
constructor
A new instance of TaskNotFoundError.
Methods inherited from Error
Constructor Details
#initialize(task_id, message: "Task not found") ⇒ TaskNotFoundError
Returns a new instance of TaskNotFoundError.
58 59 60 61 |
# File 'lib/a2a/errors.rb', line 58 def initialize(task_id, message: "Task not found") @task_id = task_id super(, code: -32001, http_status: 404) end |
Instance Method Details
#error_data ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'lib/a2a/errors.rb', line 63 def error_data [{ "@type" => "type.googleapis.com/google.rpc.ErrorInfo", "reason" => "TASK_NOT_FOUND", "domain" => "a2a-protocol.org", "metadata" => { "taskId" => @task_id.to_s }, }] end |