Commit e5372bb
fix(telegram): accept unknown fields in Bot API responses
Production deploy revealed that Telegram returns many fields beyond what we
model (User.language_code, Chat.title, assorted flags) and the strict
DisallowUnknownFields decoder rejected every response. getMe and sendMessage
both failed with "unknown field" errors, taking the bot process down on
startup.
Switch to permissive decoding: we only need the fields we declared, any
extras are ignored. Also survives Telegram API version bumps.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a65fcc0 commit e5372bb
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
417 | 421 | | |
418 | | - | |
419 | 422 | | |
420 | | - | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
| |||
0 commit comments