docs: show string status names in lifecycle and error handling#740
docs: show string status names in lifecycle and error handling#740braden-w wants to merge 3 commits intoelysiajs:mainfrom
Conversation
WalkthroughTwo documentation files are updated to demonstrate alternative syntax for HTTP status codes in error handling examples. Changes show using string literals (e.g., Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5964cab to
13c4a06
Compare
- Remove '// or' comments from teapot examples
- Add explanatory note about 418 = 'I'm a teapot' with link to status tutorial
- Use status("Unauthorized") for auth examples (clearer than 401)
13c4a06 to
f960ccc
Compare
This PR extends string status name examples to two essential documentation files: life-cycle.md and error-handling.md. When developers read these core concepts, they'll now see inline comments showing that status() accepts both numeric codes (like 401) and string names (like "Unauthorized"), making it easier to discover this convenient feature.
This change is part of a broader effort across PRs #739 and #741-#745 to improve string status name visibility throughout the documentation. By showing both options in context, we help users find the API style that works best for their code without having to dig through reference docs.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.