Return OperationOutcome for FHIRServerError#276
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough
Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@fhir-service/source_connect.bal`:
- Around line 25-34: The fallback currently hardcodes http:STATUS_BAD_REQUEST
when handling a fhirClient:FHIRServerError, which hides the upstream status;
inside the fhirClient:FHIRServerError guard (where `response` is the error),
extract the upstream status code (e.g., call `response.statusCode()` or use the
status property on the error), and pass that value into r4:createFHIRError's
httpStatusCode argument instead of http:STATUS_BAD_REQUEST so the original
upstream status (500/422/etc.) is preserved when returning the fallback error.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8457cf98-63a0-47bc-9a1f-fa1eb9af1f52
📒 Files selected for processing (1)
fhir-service/source_connect.bal
|
@coderabbitai incremental review |
|
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Purpose
Resolves https://github.com/wso2-enterprise/open-healthcare/issues/2008.
Summary by CodeRabbit