Skip to content

refactor: centralize routing error taxonomy - #558

Merged
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
telemarkdigital-publisher:refactor/issue-554-error-taxonomy
Aug 30, 2026
Merged

refactor: centralize routing error taxonomy#558
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
telemarkdigital-publisher:refactor/issue-554-error-taxonomy

Conversation

@telemarkdigital-publisher

Copy link
Copy Markdown
Contributor

Closes #554

Summary

  • Added a typed ApiError taxonomy with one code-to-status/message map and a shared apiErrorHandler.
  • Routed parser errors, domain errors, not-found, conflict, and unexpected failures through the same safe formatter.
  • Preserved requestId correlation and kept error as a compatibility alias while adding the requested code field.
  • Updated API/architecture docs for the new canonical envelope.

Verification

  • npm run lint (passes; existing warnings only)
  • npm test -- --runInBand
  • npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

structured error taxonomy and centralized error middleware for routing

2 participants