fix: sanitize Jobs and Auditor API error responses - #826
Conversation
Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughChangesAuditor conflict responses now use fixed 409 messages and sanitized logging. Jobs APIs add structured error formatting, dedicated dispatcher exceptions, contextual 404 responses, explicit conflict handling, and expanded sanitization tests. Nemo Auditor conflict responses
Jobs API error responses
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com>
mckornfield
left a comment
There was a problem hiding this comment.
bit skeptical of some of the str matching, otherwise fine
|
also pushed to my other PR for the failing test, we'll see 🙏 |
…es-expose-internal-exceptions-in-api
…es-expose-internal-exceptions-in-api
* sanitize Jobs and Auditor API error responses Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com> * fb Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com> * update test Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com> * fb Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com> --------- Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com> Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
Summary
Fixes AIRCORE-240 by preventing raw Python and backend exception details from being returned by Jobs and Auditor API endpoints.
Changes
Validation
uv run --frozen pytest services/core/jobs/tests/test_jobs_api.py -qSecurity impact
API clients no longer receive internal exception class names, database-version details, entity internals, or state-transition implementation details.
Summary by CodeRabbit