SDKS-5116: Surface distinct wrong-number failure for Push Number Challenge#211
SDKS-5116: Surface distinct wrong-number failure for Push Number Challenge#211vibhorgoswami wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthrough
ChangesPush Number Challenge Exception Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #211 +/- ##
=============================================
- Coverage 44.12% 44.08% -0.04%
Complexity 1393 1393
=============================================
Files 316 317 +1
Lines 9756 9769 +13
Branches 1495 1500 +5
=============================================
+ Hits 4305 4307 +2
- Misses 4887 4900 +13
+ Partials 564 562 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| val handler = pushHandlers[platform] ?: throw MfaException("No handler for platform: $platform") | ||
|
|
||
| // Send the approval with any additional parameters | ||
| val result = handler.sendApproval(credential, notification, params) |
There was a problem hiding this comment.
Is sendApproval client facing interface? Can we change the signature? For approval failure, it can return false or exception, I would prefer to change it as a Result object.
| // Check if the response was successful | ||
| if (response.status.isSuccess()) { | ||
| return@withContext true | ||
| } else if (response.status == 400 && notification.numbersChallenge != null) { |
There was a problem hiding this comment.
Consider replacing 400 with HttpURLConnection.HTTP_BAD_REQUEST for better readability.
JIRA Ticket
SDKS-5116
Description
This PR update the Ping Android mfa/push module so that AM 400 responses for wrong Push Number Challenge selections propagate as a distinct failure instead of being swallowed and returned as false.
Summary by CodeRabbit