Added support for fallback#1349
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds a provider-based fallback mechanism to the Challan Search interface. The new ChangesChallan Search Provider Fallback
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/mobility-core/src/Kernel/External/ChallanSearch/Interface.hs`:
- Around line 30-36: The fallback path in function go currently discards
provider-specific failures (Left _) and only throws a generic InternalError when
all providers fail; change go to preserve error context by collecting each
provider's error (e.g., capture the Left value as err along with provider
identifier) and propagate them so the final failure includes provider names and
error messages; you can implement this by adding an accumulator parameter to go
(or return an Either with Right res or Left [(Provider, Error)]), replace Left _
-> go rest with Left err -> go rest ((provider, err):acc), and when the list is
exhausted throw InternalError containing the concatenated provider-specific
errors (or log them before throwing) so
getPendingChallanCount/withTryCatch/getServiceConfig and provider identifiers
are included in the final message.
🪄 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: c67b06bf-b989-49ab-b41b-8e6c3ea6e08d
📒 Files selected for processing (1)
lib/mobility-core/src/Kernel/External/ChallanSearch/Interface.hs
|
@ClaudeWeb Can you review this PR, by making sure existing principles are being followed also error handling is proper ? |
|
I'll fetch the PR diff, description, and comments in parallel to get full context.Let me try using the GitHub MCP tools instead.Now let me get the PR files and read the existing source code for full context.Now let me read the key files in parallel for full context.Let me look at similar fallback patterns in the codebase and how PR Review:
|
|
Let me fetch the latest state of the PR.The file SHA and patch are identical to the previous review — the branch hasn't received a new push yet. Let me verify by checking the commit history on the PR branch.The PR branch ( The previous review findings still stand in full:
What the author needs to do:
Once the push shows up, tag me again and I'll re-review the updated diff. |
@ClaudeWeb for " I added for Left err -> logError $ "getPendingChallanCount failed with error: " <> show err <> " - Provider: " <> show provider |
|
The logic you've described is correct. Let me trace through it to confirm. Trace with Trace with The key point: One thing to confirm before pushing: The distinction between the two error messages is intentional and correct —
Both paths are independently reachable. Keep them both. The only remaining gap (low priority): When The logic is sound — push it and tag me for a final re-review. |
Type of Change
Description
Added support for priority List fallback
Additional Changes
Motivation and Context
How did you test it?
Checklist
./dev/format-all-files.shSummary by CodeRabbit