agent2agentSourcetest

test

Specification excerpt: refs/A2A/docs/specification.md, Section 3.3.2 Error Handling

All operations may return errors in the following categories. Servers MUST return appropriate errors and SHOULD provide actionable information to help clients resolve issues.

Error Categories and Server Requirements:

Error Payload Structure:

All error responses in the A2A protocol, regardless of binding, MUST convey the following information:

  1. Error Code: A machine-readable identifier for the error type (e.g., string code, numeric code, or protocol-specific status)
  2. Error Message: A human-readable description of the error
  3. Error Details (optional): An array of objects providing additional structured information about the error. Each object in the array MUST include a @type key that identifies the object's type (using ProtoJSON Any representation). Well-known types from the google.rpc error model (e.g., ErrorInfo, BadRequest) SHOULD be used where applicable. Error details may be used for:
    • Affected fields or parameters
    • Contextual information (e.g., task ID, timestamp)
    • Suggestions for resolution

Protocol bindings MUST map these elements to their native error representations while preserving semantic meaning.

A2A-Specific Errors:

Error Name Description
TaskNotFoundError The specified task ID does not correspond to an existing or accessible task.
TaskNotCancelableError An attempt was made to cancel a task that is not in a cancelable state.
PushNotificationNotSupportedError Client attempted to use unsupported push notification features.
UnsupportedOperationError The requested operation or aspect is unsupported by this server agent.
ContentTypeNotSupportedError A Media Type in request parts or artifacts is unsupported.
InvalidAgentResponseError An agent returned a response that does not conform to the specification.
ExtendedAgentCardNotConfiguredError The agent lacks a configured extended agent card when required.
ExtensionSupportRequiredError A required extension was not declared as supported by the client.
VersionNotSupportedError The requested A2A-Version is not supported by the agent.

Nested