docs: add user-facing error handling guide to docs/sdk_users/#2249
docs: add user-facing error handling guide to docs/sdk_users/#2249bhuvan-somisetty wants to merge 3 commits into
Conversation
Up to standards ✅🟢 Issues
|
WalkthroughAdds a user-facing error handling guide (docs/sdk_users/error_handling.md) describing PrecheckError, MaxAttemptsError, ReceiptStatusError, ResponseCode usage, examples, and retry guidance; adds links from README and running_examples to the new guide. ChangesError Handling Documentation
Repository Docs Links
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
b06b433 to
467bc05
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 95133046-c8d7-4227-9ae3-7d77af0442bd
📒 Files selected for processing (3)
README.mddocs/sdk_users/error_handling.mddocs/sdk_users/running_examples.md
205f450 to
7c99680
Compare
|
Hi @bhuvan-somisetty, thanks for the contribution! The branch is out-of-date, and all commits are not verified. This guide may help with GPG ( |
aceppaluni
left a comment
There was a problem hiding this comment.
@bhuvan-somisetty Please let us know if you need assistance with commit signing.
We're happy to help!
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
7c99680 to
9286ee7
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 89697b87-69d9-419b-9cc9-1dbddfbe2d5e
📒 Files selected for processing (3)
README.mddocs/sdk_users/error_handling.mddocs/sdk_users/running_examples.md
|
|
||
| ## Understanding ResponseCode | ||
|
|
||
| `ResponseCode` is an `IntEnum` with approximately 394 named values representing every status the Hedera network can return. |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | 💤 Low value
Consider rephrasing the specific number.
"Approximately 394 named values" is oddly precise. If the count is exact, remove "approximately." If it's an estimate, use "hundreds of" or similar phrasing that won't require updates as the API evolves.
Suggested alternatives
-`ResponseCode` is an `IntEnum` with approximately 394 named values representing every status the Hedera network can return.
+`ResponseCode` is an `IntEnum` with hundreds of named values representing every status the Hedera network can return.Or if the count is exact:
-`ResponseCode` is an `IntEnum` with approximately 394 named values representing every status the Hedera network can return.
+`ResponseCode` is an `IntEnum` with 394 named values representing every status the Hedera network can return.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| `ResponseCode` is an `IntEnum` with approximately 394 named values representing every status the Hedera network can return. | |
| `ResponseCode` is an `IntEnum` with hundreds of named values representing every status the Hedera network can return. |
| - [examples/errors/precheck_error.py](../../examples/errors/precheck_error.py) — runnable `PrecheckError` example | ||
| - [examples/errors/receipt_status_error.py](../../examples/errors/receipt_status_error.py) — runnable `ReceiptStatusError` example | ||
| - [examples/errors/max_attempts_error.py](../../examples/errors/max_attempts_error.py) — runnable `MaxAttemptsError` example | ||
| - [receipt_status_error.md](../sdk_developers/training/receipt_status_error.md) — internal training doc on receipt status errors |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
Consider removing the sdk_developers training link.
Line 186 links to an internal training document intended for SDK developers, but this error_handling.md guide is in docs/sdk_users/ for SDK users. Mixing audiences may confuse readers who expect user-focused resources only.
Consider either:
- Removing this link entirely
- Moving it to a separate "For SDK Developers" section if cross-linking is intentional
exploreriii
left a comment
There was a problem hiding this comment.
Yoru key is not set up correctly
https://github.com/hiero-ledger/hiero-sdk-python/pull/2249/commits
Closes #2245
Summary
docs/sdk_users/error_handling.md— a new user-facing guide covering all three SDK exception types (PrecheckError,MaxAttemptsError,ReceiptStatusError) with attribute tables, when-raised descriptions, code examples,ResponseCodereference, a combined practical example, and retry/backoff guidance.README.md— adds an Error Handling link in the For SDK Users documentation section.docs/sdk_users/running_examples.md— adds a See Also cross-link at the bottom pointing to the new guide.What this is NOT
The existing
docs/sdk_developers/training/receipt_status_error.md(issues #876–#878) covers a single exception for SDK contributors. This guide is for application developers using the SDK and covers all three exceptions in one place.Changes
docs/sdk_users/error_handling.mdREADME.mddocs/sdk_users/running_examples.mdTest plan
error_handling.mdrenders correctly on GitHubhiero_sdk_python.exceptions,hiero_sdk_python.response_code)