astro/.changeset/quick-turtles-decide.md
Ben Holmes c638740906
[Content collections] Better error formatting (#6508)
* feat: new error map with unions, literal, and fbs

* fix: bad type casting on type error

* refactor: add comments, clean up edge cases

* refactor: JSON.stringify, add colon for follow ups

* refactor: bold file name in msg

* fix: prefix union errors

* test: new error mapping

* refactor: clean up Required handling

* test: required, fallthrough

* chore: changeset

* fix: out-of-date error msg

* chore: stray console log

* docs: revert to old error msg
2023-03-13 14:16:17 -04:00

211 B

astro
patch

Improve content collection error formatting:

  • Bold the collection and entry that failed
  • Consistently list the frontmatter key at the start of every error
  • Rich errors for union types