Skip to content

🩹 server: route paused and rejected bridge users to onboarding#940

Merged
cruzdanilo merged 1 commit intomainfrom
rejected
Apr 8, 2026
Merged

🩹 server: route paused and rejected bridge users to onboarding#940
cruzdanilo merged 1 commit intomainfrom
rejected

Conversation

@mainqueg
Copy link
Copy Markdown
Member

@mainqueg mainqueg commented Apr 8, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Updated bridge user handling: users with paused or rejected provider status are now redirected to the onboarding flow instead of showing as unavailable.

Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: 23b261c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@exactly/server Patch

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Walkthrough

This 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

Cohort / File(s) Summary
Bridge Status Routing
server/utils/ramps/bridge.ts
Modified getProvider switch statement to handle "paused" and "rejected" statuses as onboarding states instead of unavailable, returning ONBOARDING status with base currencies and capturing a "bridge user onboarding" exception.
Bridge Test Updates
server/test/utils/bridge.test.ts
Updated test expectations for paused and rejected user statuses from "NOT_AVAILABLE" to "ONBOARDING", and added assertions verifying captureException is called with warning-level events containing "bridge user onboarding" message.
Release Changelog
.changeset/bright-foxes-route.md
Added changeset documenting patch-level release for @exactly/server noting route pause and bridge user rejection with onboarding redirection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • nfmelendez
  • cruzdanilo
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: routing paused and rejected bridge users to onboarding, which is reflected in all three modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rejected

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

gemini-code-assist[bot]

This comment was marked as resolved.

@sentry
Copy link
Copy Markdown

sentry bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.89%. Comparing base (4c6b45b) to head (23b261c).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
e2e 51.50% <ø> (-0.79%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🔵 Trivial

Consider adding context to distinguish paused/rejected from other onboarding states.

The captureException call uses the same "bridge user onboarding" message for paused, 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c6b45b and 23b261c.

📒 Files selected for processing (3)
  • .changeset/bright-foxes-route.md
  • server/test/utils/bridge.test.ts
  • server/utils/ramps/bridge.ts

@mainqueg mainqueg marked this pull request as ready for review April 8, 2026 14:15
@cruzdanilo cruzdanilo merged commit 23b261c into main Apr 8, 2026
14 checks passed
@cruzdanilo cruzdanilo deleted the rejected branch April 8, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants