Developer Docs
Template Errors & Sanitization
Diagnose LaTeX and sty validation failures, sanitization errors, and safe correction workflows.
Template content is validated and sanitized before compilation. This protects system stability and prevents unsafe LaTeX behavior.
Validation layers
- Template content presence and mode compatibility checks
- LaTeX sanitizer denylist enforcement
- .sty placeholder mapping validation
Common error patterns
Error matrix
| Status | Likely cause | How to fix | Retry? |
|---|---|---|---|
| 422 | LaTeX sanitize validation failed | Remove disallowed primitives and re-validate content | no |
| 422 | Invalid .sty named placeholder mapping | Correct placeholder declarations and command signatures | no |
| 500 | Compilation failure during render | Inspect latest template changes and preview output incrementally | depends |
Troubleshooting flow
- Revert to last known-good version
- Apply smallest failing diff and test
- Preview with multiple candidate profiles
- Republish only after stable outputs across profile extremes
Security note
Do not attempt to bypass sanitizer behavior. The compile pipeline intentionally constrains unsafe LaTeX execution patterns.