🩹 server: route paused and rejected bridge users to onboarding#940
🩹 server: route paused and rejected bridge users to onboarding#940cruzdanilo merged 1 commit intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 23b261c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis PR modifies how bridge provider availability is determined for paused and rejected users. Previously marked as unavailable, these statuses now route users to onboarding with corresponding test updates and exception logging. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #940 +/- ##
==========================================
- Coverage 71.59% 70.89% -0.70%
==========================================
Files 228 227 -1
Lines 8277 8274 -3
Branches 2661 2658 -3
==========================================
- Hits 5926 5866 -60
- Misses 2121 2178 +57
Partials 230 230
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
server/utils/ramps/bridge.ts (1)
191-204: 🧹 Nitpick | 🔵 TrivialConsider adding context to distinguish
paused/rejectedfrom other onboarding states.The
captureExceptioncall uses the same"bridge user onboarding"message forpaused,rejected, and five other statuses (under_review,awaiting_questionnaire,awaiting_ubo,incomplete,not_started). This makes it harder to monitor or alert specifically on rejected or paused users returning to onboarding.If tracking these cases matters for observability, consider including the status in the exception context:
♻️ Suggested improvement
case "paused": case "rejected": case "under_review": case "awaiting_questionnaire": case "awaiting_ubo": case "incomplete": case "not_started": - captureException(new Error("bridge user onboarding"), { contexts: { bridgeUser }, level: "warning" }); + captureException(new Error("bridge user onboarding"), { + contexts: { bridgeUser }, + level: "warning", + tags: { bridgeStatus: bridgeUser.status }, + });
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4549cc3b-6ccd-43e4-8280-9f128c9d0f91
📒 Files selected for processing (3)
.changeset/bright-foxes-route.mdserver/test/utils/bridge.test.tsserver/utils/ramps/bridge.ts
Summary by CodeRabbit