Raised when a template cannot be compiled or rendered.
Types
:heex_compile— HEEx compilation failed (syntax, unclosed tag, etc.):missing_assign— a required assign was not provided torender/3:helper_undefined— a helper function referenced in the template is not defined:inliner_failed— Premailex (or alternative CSS inliner) raised
See Mailglass.Error for the shared contract and docs/api_stability.md
for the locked :type atom set.
Summary
Functions
Returns the closed set of valid :type atoms. Tested against docs/api_stability.md.
Build a Mailglass.TemplateError struct.
Types
@type t() :: %Mailglass.TemplateError{ __exception__: true, cause: Exception.t() | nil, context: %{required(atom()) => term()}, message: String.t(), type: :heex_compile | :missing_assign | :helper_undefined | :inliner_failed }
Functions
@spec __types__() :: [atom()]
Returns the closed set of valid :type atoms. Tested against docs/api_stability.md.
Build a Mailglass.TemplateError struct.
Options
:cause— an underlying exception to wrap (kept out of JSON output).:context— a map of non-PII metadata;:assignis used to fill in the missing-assign message.