Skip to content

Conversation

@flxo
Copy link

@flxo flxo commented Dec 4, 2025

Add error documentation for pipe option getter functions, including NNG_ENOENT which can be returned when the pipe does not exist.

fixes #2198

Summary by CodeRabbit

  • Documentation
    • Expanded error documentation for pipe functionality, providing detailed descriptions of possible error conditions and their meanings for better developer support.

✏️ Tip: You can customize this high-level summary in your review settings.

Add error documentation for pipe option getter functions, including
NNG_ENOENT which can be returned when the pipe does not exist.
@flxo flxo requested a review from gdamore as a code owner December 4, 2025 09:28
@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Walkthrough

Documentation update adding an "Errors" subsection to the nng_pipe_get_strlen function reference, enumerating five possible error codes (NNG_ENOENT, NNG_ENOTSUP, NNG_EBADTYPE, NNG_ENOMEM, NNG_ENOSPC) with brief descriptions for each.

Changes

Cohort / File(s) Summary
Documentation — Error Reference
docs/ref/api/pipe.md
Added "Errors" subsection documenting possible error codes returned by nng_pipe_get_strlen, including NNG_ENOENT (pipe not found), NNG_ENOTSUP (option not supported), NNG_EBADTYPE (wrong type), NNG_ENOMEM (out of memory), and NNG_ENOSPC (insufficient space).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single documentation file with straightforward error enumeration
  • No code logic or control flow changes to validate

Poem

🐰 A rabbit hops through doc so fine,
Errors listed, all in line!
ENOENT now shines, no more obscure,
The API path, now crystal clear! ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: documenting possible errors for nng_pipe_get functions.
Description check ✅ Passed The description follows the template format with the fixes reference and explains the change, though it could be more detailed about what errors were documented.
Linked Issues check ✅ Passed The PR successfully addresses issue #2198 by adding error documentation including NNG_ENOENT for nng_pipe_get functions as requested.
Out of Scope Changes check ✅ Passed All changes are scoped to documenting errors for pipe getter functions as specified in issue #2198, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7291d12 and b3f2dac.

📒 Files selected for processing (1)
  • docs/ref/api/pipe.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: deploy
🔇 Additional comments (1)
docs/ref/api/pipe.md (1)

136-145: Document is well-structured; verify completeness of error codes.

The new "Errors" subsection directly addresses the PR objective by documenting NNG_ENOENT and provides helpful context for related error scenarios. The placement and formatting are consistent with the documentation style.

Ensure the documented error codes are exhaustive. Common API error codes like NNG_EINVAL (invalid argument), NNG_ECLOSED (pipe/socket closed), or transport-specific errors should be evaluated for inclusion if they can occur in these getter functions.

Can you confirm that the five error codes listed here represent the complete set of possible errors that nng_pipe_get_* functions can return? If there are additional error codes (e.g., NNG_EINVAL, NNG_ECLOSED), they should be added to the documentation.


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

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