Skip to content

src/dazzle_back/graphql/adapters/errors.py

Generated: 2026-03-30T04:38:46.301118+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Error normalization for external API responses.

Provides a unified error model that normalizes different error formats from external APIs (HMRC, banks, Xero, etc.) into a consistent structure for the GraphQL layer.

This enables: - Consistent error messages for clients - Structured error details fo...

Key Exports

  • ErrorCategory
  • ErrorSeverity
  • NormalizedError
  • normalize_error
  • normalize_hmrc_error
  • to_graphql_extensions
  • to_log_dict

Dependencies

Imports

  • __future__.annotations
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.UTC
  • datetime.datetime
  • enum.Enum
  • typing.TYPE_CHECKING
  • typing.Any
  • dazzle_back.graphql.adapters.base.AdapterError
  • dazzle_back.graphql.adapters.base.ApiError
  • dazzle_back.graphql.adapters.base.AuthenticationError
  • dazzle_back.graphql.adapters.base.RateLimitError
  • dazzle_back.graphql.adapters.base.TimeoutError
  • dazzle_back.graphql.adapters.base.ValidationError
  • dazzle_back.graphql.adapters.base.AdapterError
  • dazzle_back.graphql.adapters.base.ApiError
  • dazzle_back.graphql.adapters.base.AuthenticationError
  • dazzle_back.graphql.adapters.base.RateLimitError
  • dazzle_back.graphql.adapters.base.TimeoutError
  • dazzle_back.graphql.adapters.base.ValidationError

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_constraint_errors.py
  • tests/unit/test_adapters.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.