Commit e44a8e2
Truncate long MIME parse error messages (#202)
## Summary
- Cap `FirstLine()` output at 200 runes using the existing
`TruncateRunes` helper
- Prevents enmime's malformed-MIME error messages (which embed the full
email content as a single line) from flooding console output during sync
- Uses rune-safe truncation to avoid splitting multi-byte UTF-8
characters in non-ASCII error text
## Test plan
- [x] Existing `TestFirstLine` tests pass
- [x] New test cases: long ASCII lines, exact boundary (200 runes), long
first line of multi-line, and Unicode truncation safety
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 98f3186 commit e44a8e2
2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
| 146 | + | |
146 | 147 | | |
147 | | - | |
| 148 | + | |
148 | 149 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
| |||
0 commit comments