fix: add missing exception chaining (from e) in 3 files [BLDX-992]#1312
fix: add missing exception chaining (from e) in 3 files [BLDX-992]#1312vaibhavatlan merged 2 commits intorefactor-v3from
Conversation
Redis error handler, credentials JSON parser, and credential resolver all raised wrapped exceptions without chaining the original cause, losing traceback context needed for debugging.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📜 Docstring Coverage ReportRESULT: PASSED (minimum: 30.0%, actual: 80.6%) Detailed Coverage Report |
📦 Trivy Vulnerability Scan Results
Report SummaryCould not generate summary table (data length mismatch: 9 vs 8). Scan Result Detailsrequirements.txtuv.lock |
📦 Trivy Secret Scan Results
Report SummaryCould not generate summary table (data length mismatch: 9 vs 8). Scan Result Detailsrequirements.txtuv.lock |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
|
🛠 Docs available at: https://k.atlan.dev/application-sdk/BLDX-992 |
|
🛠 Full Test Coverage Report: https://k.atlan.dev/coverage/application-sdk/pr/1312 |
vaibhavatlan
left a comment
There was a problem hiding this comment.
SDK Review: All checks pass. APPROVED.
All three exception chaining gaps are correctly addressed: from e / from exc is added to every raise site in clients/redis.py, common/utils.py, and credentials/resolver.py. This is a non-behavioral correctness fix (exception __cause__ chain is preserved for debugging without changing runtime behavior). No new tests are required per policy for this category.
One observation (pre-existing, outside this diff): the Redis error handler embeds {e} in the new exception message string AND now chains the original exception via from e. Both convey the same information; the message string is redundant but not harmful. Flagging for awareness only — not a blocker.
vaibhavatlan
left a comment
There was a problem hiding this comment.
All 4 reviewers confirm — ready for human merge
- Architecture: APPROVED
- Code Quality: APPROVED
- Security: APPROVED
- Test Quality: APPROVED
No Critical findings. All review feedback addressed. All tests passing.
What was found
Rule: BUG-015 / QUAL-EXC-CHAIN
Files:
clients/redis.py:25,common/utils.py:505,credentials/resolver.py:96Severity: high
Three locations raise wrapped exceptions without
from e:_handle_redis_error()— all 4 raise branches lose original Redis errorparse_credentials_extra()— loses JSON parse error detailsCredentialResolver.resolve()— loses SecretNotFoundError contextWhat was fixed
Added
from e/from excto all raise statements, preserving exception chains.Validation
Linear
https://linear.app/atlan-epd/issue/BLDX-992