Skip to content

[Bug]: HTTP+JSON error responses use non-standard fields #727

@jmesnil

Description

@jmesnil

What happened?

Summary

HTTP+JSON error responses use non-standard fields (error/message) instead of RFC 9457 Problem Details format — missing required type field with A2A error URI.

Requirement

Specification

HTTP error responses use RFC 9457 Problem Details format with Content-Type: application/problem+json.

For A2A-specific errors, the type field MUST use the URI from the mapping table in Section 5.4 (Error Code Mappings).

Expected behavior

A2A error responses must include a type field with the error URI from the spec's mapping table:

{
  "type": "https://a2a-protocol.org/errors/task-not-found",
  "title": "Task Not Found",
  "status": 404,
  "detail": "The specified task ID does not exist or is not accessible"
}

Actual behavior

The SUT returns Content-Type: application/problem+json correctly, but the body uses non-standard fields without a type field:

{
  "error": "io.a2a.spec.TaskNotFoundError",
  "message": "Task not found"
}

Reproducer

# GET a non-existent task — should return RFC 9457 Problem Details with 'type'
curl -s http://localhost:9999/tasks/tck-nonexistent-pd-test | python3 -m json.tool

# Actual:   {"error": "io.a2a.spec.TaskNotFoundError", "message": "Task not found"}
# Expected: {"type": "https://a2a-protocol.org/errors/task-not-found", "title": "Task Not Found", "status": 404, "detail": "..."}

TCK test

tests/compatibility/core_operations/test_error_handling.py::TestRestErrorStructure::test_error_uses_problem_details

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

compatibilityIssue related to A2A compatibilityhttp+jsonIssue related to the HTTP+JSON transport

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions