Quarantine, Don't Drop: What I Do With Webhook Payloads That Fail Validation
Описание и применение
Проблема: некорректные вебхуки теряются при отклонении. Решение: сохранять невалидные сообщения в таблице, отслеживать их, и после исправления парсера воспроизводить события. В итоге восстановлено 214 событий.
Задача
Webhook payloads often fail validation due to undocumented fields, type changes, or null values, leading to lost events when dropped.
Результат
Recovered 214 events last month from a provider’s undocumented field rename with minimal human effort.
Рабочий процесс
- Validate payload
- If valid, process
- If invalid, insert raw body, errors, timestamp, source, and status into quarantine table
- Schedule alerts on quarantine depth per source
- When parser fixed, run replay workflow that reads new rows, feeds raw body into same processing sub-workflow, uses idempotency keys, marks as replayed or leaves new on failure
Доказательства
Failing validation doesn't make a payload worthless — it makes it evidence.
The quarantine is not a log line. It's a table row with four things: raw body, validation errors, received timestamp + source, status.
Last month this recovered 214 events from a provider's undocumented field rename.
- Дата записи: 2026-10-20T14:56:36.757Z