# Catch bad template data before an email sends
URL: https://samva.dev/changelog/catch-bad-template-data-before-an-email-sends
> A template send now checks your data against the template's input schema, so a missing or mistyped field fails the request instead of reaching a recipient.
- Published: 2026-09-08
- Tags: templates, sdk, api

A template send now fails fast when the data doesn't match what the template expects. A missing or mistyped field is rejected before anything renders, so a broken email never reaches a recipient.

**What you need to do.** Republish templates you authored before this release, then regenerate your types:

```bash
samva templates types
```

Add `--check` in CI to fail the build when types drift. You can pin a send to one version with `email.publicationId`, or take the latest compatible one with `email.inputContractId`. Retries reuse the content already rendered, so a retry never changes what was sent.

## Links

- [samva 0.4.0 on npm](https://www.npmjs.com/package/samva/v/0.4.0)
- [Email templates](/docs/sml)

## Related

- [Spot failing domains, webhooks, and keys faster](/changelog/spot-failing-domains-webhooks-and-keys-faster)
- [Edit an email template with AI, no account needed](/changelog/edit-an-email-template-with-ai-no-account)
- [All changelog entries](/changelog)
