Skip to content

[Notifications] Add Template Render Error Handling #136

Description

@ScriptedBro

Type

Task

Estimated Effort

1-3 development days

Summary

Return structured errors when notification templates are missing required variables or fail rendering.

Scope

apps/backend/notifications/templates/, apps/backend/notifications/email/index.ts

Required Data Structure

export interface TemplateRenderResult { html?: string; text?: string; error?: string }

Implementation Tasks

  • Validate required template variables before rendering.
  • Avoid sending partially rendered emails.
  • Add tests for valid and missing-variable renders.
  • Keep the change scoped to the listed files or the smallest adjacent module needed.
  • Follow existing API response, contract error, and event naming conventions.

Acceptance Criteria

  • The feature or fix is implemented with no new difficulty labels.
  • Unit or contract tests cover the success path and at least one failure path.
  • Any new migration, environment variable, or event shape is documented near the affected service or contract.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend services and APIs

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions