Skip to content

ADR-0112 batch 3: retire the legacy error-shape compatibility layer (error.type, client multi-location probe, enum twins) #4004

Description

@os-zhuang

Batch 3 of ADR-0112's rollout (#3841; batch 1 = #3988, batch 2 = #4003). Runs after batch 2 — until every emitter speaks the catalog, the compatibility layer below is still load-bearing.

  • Retire error.type as a code carrier. Producers still emitting the code under type move it to code; type either disappears or is redeclared for its original purpose.
  • Delete ObjectStackClient's multi-location code probe. The client reads error.code / error.details.code / error.details.type / error.type in order (kept for old-server compat through The dispatcher puts the HTTP status in error.code and parks the real code in details — pinned in #3687, still unfixed #3842). Once servers this client version supports all emit error.code, collapse to a single read.
  • Fix the client's category / retryable reads. They currently look for these under nesting that the envelope never standardized; align with ApiErrorSchema/EnhancedApiErrorSchema as declared.
  • Dedupe the connector-side ErrorCategory / RetryStrategy twins — the connector packages carry local copies of enums the spec already exports; import from @objectstack/spec instead.

Refs #3841, #3842, #3988.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions