Class: A2A::TaskNotCancelableError
- Inherits:
-
JSONRPC::Error
- Object
- JSONRPC::Error
- A2A::TaskNotCancelableError
- Defined in:
- lib/a2a/types/task_not_cancelable_error.rb
Overview
Error non-cancelable tasks (-32002)
Raised when a task cannot be canceled. An attempt was made to cancel a task that is not in a cancelable state (e.g., it has already reached a terminal state like completed, failed, or canceled).
Instance Method Summary collapse
-
#initialize(message = 'Task cannot be canceled.', data: nil, request_id: nil) ⇒ TaskNotCancelableError
constructor
Creates a new Task Not Cancelable Error with code -32002.
Constructor Details
#initialize(message = 'Task cannot be canceled.', data: nil, request_id: nil) ⇒ TaskNotCancelableError
Creates a new Task Not Cancelable Error with code -32002
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/a2a/types/task_not_cancelable_error.rb', line 29 def initialize( = 'Task cannot be canceled.', data: nil, request_id: nil ) super( , code: ErrorCodes::TASK_NOT_CANCELABLE, data:, request_id: ) end |