Skip to content

Add DisplayError and a central message catalog - #26

Merged
atherdon merged 1 commit into
mainfrom
chore/central-errors
Oct 4, 2026
Merged

atherdon merged 1 commit into
mainfrom
chore/central-errors

Conversation

@atherdon

@atherdon atherdon commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add DisplayError in src/runtime/errors.ts with stable codes (slot_type, slot_return, shell_part_missing) and a single displayErrors catalog.
  • Slot type rejects and a missing email shell part now throw DisplayError instead of a raw TypeError. The name is always DisplayError, so logs show the failure kind immediately.
  • Render and validation failures stay RenderError from @llazyemail/render-template. Message text for the moved throws is unchanged.

Test plan

  • npm test (45 passing)
  • npm run typecheck
  • npm run test:coverage (100% on executable src files)

Package-owned rejects now throw DisplayError with a stable code. Slot and missing-shell messages are built in src/runtime/errors.ts. Render and validation failures stay RenderError.
@atherdon
atherdon merged commit bca3914 into main Oct 4, 2026
7 checks passed
@atherdon
atherdon deleted the chore/central-errors branch October 4, 2026 04:51
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.

1 participant