Skip to content

Example 18: API Error Handling (unified error contract) #17

Description

@patterncatalyst

Chapter

_docs/18-appendix-e-errors.md — API Error Handling

Example Path

examples/18-errors/

What to demonstrate

  • Unified error shape: code, message, trace id, retryable flag, field details
  • Same contract across REST, gRPC, GraphQL, and Kafka
  • Retry-storm controls
  • Trace ID propagation in error responses

Stack

  • Infra: Podman — Kafka + LGTM
  • Language: Python (FastAPI + grpcio + Strawberry + aiokafka)
  • Priority: Medium

Deliverables

  • compose.yaml
  • Service demonstrating errors across all 4 protocols
  • README.md
  • verify.sh
  • Flip chapter footer to verified

Metadata

Metadata

Assignees

No one assigned

    Labels

    exampleRunnable example implementationpodman-stackExample uses podman compose infrastructure

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions