{
  "id": 4688143,
  "title": "ValidationError Is Not a Policy",
  "url": "https://urgent.news/2026/08/31/validationerror-is-not-a-policy",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-31T18:01:21.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/den0011/validationerror-is-not-a-policy-3jpp"
  },
  "original_language": "en",
  "account": "Many articles about data validation seem to reach the same conclusion: define the schema, validate at the boundary, and raise ValidationError when the payload doesn't match. However, this serves only to state that the record is wrong and does not address who should fix the record and if they can. The tutorial typically assumes the client will fix the bad JSON, returning a 400 code and allowing the client to make the correction. The author, running a science-and-tech digest, operates with three boundaries within one process, each with differing responses.\n\nThe validation code is similar across the three boundaries. However, the post-validation actions differ significantly. For instance, feeds from strangers are not expecting any error message. Publishers may send entries with missing links, titles, dates, or badly formed documents. The author chooses to validate per entry instead of rejecting the entire feed when a single entry is flawed, preventing the publisher's typo from silencing a source. Entries without a link or title are skipped, while the rest of the batch is kept without logging an incident.\n\nThe second boundary involves deciding whether to reject or not. Sometimes, entries without a date are stamped with the time the author saw them, introducing a fabricated value that may not be ideal. However, the author explains that this decision is based on the fact that dropped articles never return, and the slight delay in freshness is worth keeping the article in the system. There is a price for this choice, but the author believes it is worth it.\n\nThe third boundary, unrelated to validity, concerns the quantity of entries. Some feeds, especially WordPress archives, provide a large volume of data that could potentially overwhelm the system. To avoid this, there is a ceiling on how many entries are taken from each feed during a poll. The author stresses that quantity is its own failure mode, as a schema can certify valid records, but it cannot control the volume of data.",
  "summary": "Every article about data validation ends in the same place. Mine does too : define the schema, validate at the boundary, and when the payload doesn't match, raise. That's an honest end to the topic and a dishonest end to the job. raise ValidationError is punctuation. It states that this record is wrong. It says nothing about what the system owes the record next — and that part isn't a matter of…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}