Skip to content

Conversation

@braden-w
Copy link
Contributor

@braden-w braden-w commented Dec 6, 2025

This converts auth-related numeric status codes to descriptive string names across the guard, encapsulation, plugin, and best-practice documentation. Instead of status(401) and status(403), the examples now use status("Unauthorized") and status("Forbidden").

The motivation is simple: auth errors like "Unauthorized" are more self-documenting than their numeric equivalents. When scanning code or following a tutorial, the intent is immediately clear without needing to remember HTTP status code meanings. This is especially helpful for developers new to web APIs who might not have status codes memorized.

That said, this is a stylistic preference. Both forms work identically at runtime, so if you prefer keeping numeric codes for auth errors, feel free to reject this PR. I won't be offended.

This is part of a broader effort to improve the visibility of string status names in the documentation. Related PRs #739-#742 handle other status code categories, while #744-#745 add explicit examples showing that string names are supported.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 6, 2025

Warning

Rate limit exceeded

@braden-w has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5e5da8b and d5bc7a8.

📒 Files selected for processing (5)
  • docs/essential/best-practice.md (3 hunks)
  • docs/essential/plugin.md (1 hunks)
  • docs/tutorial/getting-started/encapsulation/data.ts (2 hunks)
  • docs/tutorial/getting-started/encapsulation/index.md (6 hunks)
  • docs/tutorial/getting-started/guard/index.md (4 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Convert auth-related numeric status codes to descriptive strings:
- status(401) → status("Unauthorized")
- status(403) → status("Forbidden")

Files updated:
- tutorial/getting-started/guard
- tutorial/getting-started/encapsulation
- essential/plugin
- essential/best-practice
@braden-w
Copy link
Contributor Author

braden-w commented Dec 6, 2025

Superseded by #747 (conversions)

@braden-w braden-w closed this Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant