Document Ghost error field usage#635
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
WalkthroughThis PR adds comprehensive documentation to the Ghost error handling system without modifying any code logic or type definitions. The README is expanded with a concrete usage example showing how to throw a typed error, a field guide table describing each supported error property and its intended use, and a section highlighting common mistakes with before/after examples. The GhostError.ts source file receives matching JSDoc comments on the GhostErrorOptions interface fields to document their purposes at the definition site. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
- Coverage 98.12% 97.92% -0.20%
==========================================
Files 84 49 -35
Lines 2771 1975 -796
Branches 510 395 -115
==========================================
- Hits 2719 1934 -785
+ Misses 11 7 -4
+ Partials 41 34 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6fe1679 to
25d1659
Compare
Summary
GhostErrorOptionsso generated types make the field semantics clearer.Testing
pnpm --filter @tryghost/errors testpnpm exec oxfmt -c .oxfmtrc.json --check \"packages/errors/**/*.{js,ts,json,md}\"