dist/cursor/a2a-multi-agent/skills/a2a-error-handling/SKILL.md
Implement A2A error handling — JSON-RPC errors, A2A-specific error codes, task failure states, retry strategies, and graceful degradation. Use when building robust error handling in A2A agents.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins a2a-error-handlingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
https://a2a-protocol.org/latest/specification/ for the error handling sectionsite:github.com a2aproject A2A error codes for error code definitionssite:github.com a2aproject a2a-samples error for error handling examplesA2A has three categories of errors:
failed)All errors follow the JSON-RPC 2.0 error response format:
{
"jsonrpc": "2.0",
"id": "request-id",
"error": {
"code": -32600,
"message": "Invalid Request",
"data": { "details": "..." }
}
}
| Code | Name | Meaning |
|------|------|---------|
| -32700 | Parse error | Invalid JSON |
| -32600 | Invalid request | Not a valid JSON-RPC request |
| -32601 | Method not found | Method doesn't exist or isn't supported |
| -32602 | Invalid params | Method parameters are invalid |
| -32603 | Internal error | Server internal error |
| Code | Name | Meaning |
|------|------|---------|
| -32001 | TaskNotFoundError | The referenced taskId doesn't exist |
| -32002 | TaskNotCancelableError | Task is in a state that can't be canceled (terminal state) |
| -32003 | PushNotificationNotSupportedError | Agent doesn't support push notifications |
| -32004 | UnsupportedOperationError | The requested operation is not supported |
| -32005 | ContentTypeNotSupportedError | Client's accepted output modes don't match agent's capabilities |
| -32006 | InvalidAgentResponseError | The agent returned an invalid or malformed response |
| -32007 | ExtendedAgentCardNotConfiguredError | Extended Agent Card is not configured |
| -32008 | ExtensionSupportRequiredError | A required extension is not supported |
| -32009 | VersionNotSupportedError | The requested protocol version is not supported |
Important distinction:
failed state — the request was valid but the task's processing failedExample: If a client sends message/send with invalid JSON → -32700 (protocol error). If a client sends a valid message but the agent's LLM call fails → task state becomes failed with an error message.
The server should:
-32600/-32700 for malformed requests-32601 for unsupported methods-32602 for invalid params-32001 for unknown task IDs-32003/-32005 for unsupported features-32007 if extended Agent Card is not configured-32603 for unexpected server errorsfailed for task-level processing errorsThe client should:
error field vs result field-32603 (internal error) may be retryable-32601 (method not found) won't succeed on retryfailed and read the error message| Error Code | Retryable? | Strategy |
|-----------|------------|----------|
| -32700 | No | Fix the request |
| -32600 | No | Fix the request |
| -32601 | No | Method not available on this agent |
| -32602 | No | Fix the parameters |
| -32603 | Yes | Exponential backoff, max 3 retries |
| -32001 | No | Task doesn't exist |
| -32002 | No | Task can't be canceled |
| -32005 | No | Content type mismatch |
| -32007 | No | Extended Agent Card not configured |
data field in JSON-RPC errors for additional debugging contextfailed with a descriptive message when processing failsFetch the specification for the complete list of error codes, their semantics, and any error handling requirements before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.