{"record":{"id":"10242e8a0e6f591d","repo":"FoundationAgents/OpenManus","slug":"32001","errorCode":"-32001","errorMessage":"Unsupported operation","messagePattern":"Unsupported operation","errorType":"error_code","errorClass":"ServerError","httpStatus":null,"severity":"warning","filePath":"protocol/a2a/app/agent_executor.py","lineNumber":72,"sourceCode":"                ),\n            )\n        ]\n        event_queue.enqueue_event(\n            completed_task(\n                context.task_id,\n                context.context_id,\n                [new_artifact(parts, f\"task_{context.task_id}\")],\n                [context.message],\n            )\n        )\n\n    def _validate_request(self, context: RequestContext) -> bool:\n        return False\n\n    async def cancel(\n        self, request: RequestContext, event_queue: EventQueue\n    ) -> Task | None:\n        raise ServerError(error=UnsupportedOperationError())\n","sourceCodeStart":54,"sourceCodeEnd":73,"githubUrl":"https://github.com/FoundationAgents/OpenManus/blob/52a13f2a57d8c7f6737eefb02ccf569594d44273/protocol/a2a/app/agent_executor.py#L54-L73","documentation":"A JSON-RPC error (code -32001, UnsupportedOperation) raised as ServerError(UnsupportedOperationError()) by the executor's cancel() method. The A2A protocol allows clients to request task cancellation, but this executor performs no cancellation work and explicitly rejects cancel requests.","triggerScenarios":"An A2A client sending a tasks/cancel request for a task handled by this executor; or client code calling executor.cancel(...) directly. Any cancel path hits the unconditional raise — there is no state check, so even completed tasks cannot be 'cancelled'.","commonSituations":"Generic A2A client SDKs that automatically issue cancel on timeout or user abort; orchestration layers that cancel all in-flight tasks during shutdown; test harnesses probing protocol conformance across all methods.","solutions":["Do not send tasks/cancel to this agent; disable client-side cancellation/timeouts that trigger it.","Check the agent card / server capabilities and skip agents that do not advertise cancellation support.","If you own the executor and need cancellation, implement cancel() to signal the running agent (e.g. a cancellation event) instead of raising.","On the client, catch the -32001 error and treat it as 'cancel not supported' rather than a fatal failure."],"exampleFix":"# before\nasync def cancel(self, request, event_queue):\n    raise ServerError(error=UnsupportedOperationError())  # always fails\n# after (client side)\ntry:\n    await client.send_message(cancel_request)\nexcept ServerError as e:\n    if e.error.code == -32001:  # UnsupportedOperation\n        pass  # server cannot cancel; abandon the task locally instead","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await client.cancel_task(task_id)\nexcept ServerError as e:\n    if e.error and e.error.code == -32001:  # UnsupportedOperation\n        pass  # cancellation not supported; abandon the task locally\n    else:\n        raise","preventionTips":["Check the agent card for cancellation support before sending tasks/cancel.","Disable automatic cancel-on-timeout in client SDKs when talking to this executor.","Treat -32001 as non-fatal: log it and continue, since the task simply cannot be cancelled server-side."],"tags":["a2a","json-rpc","unsupported-operation","cancellation"],"backgroundTag":null,"analyzedSha":"52a13f2a57d8c7f6737eefb02ccf569594d44273","analyzedAt":"2026-08-15T02:33:49.993Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}