Skip to content

Conversation

@elizabeth-ilina
Copy link
Contributor

@elizabeth-ilina elizabeth-ilina commented Feb 5, 2026

Because

  • We did not have general backend error catching for the following churn methods:

    • determineStaySubscribedEligibility
    • determineCancelInterstitialOfferEligibility
    • determineCancelChurnContentEligibility
  • We did not have general try-catching in the frontend for these pages:

    • Loyalty discount stay subscribed error, [locale]/subscriptions/[subscriptionId]/loyalty-discount/stay-subscribed/error/page.tsx
    • Loyalty discount cancel error, [locale]/subscriptions/[subscriptionId]/loyalty-discount/cancel/error/page.tsx
    • Loyalty discount stay subscribed, [locale]/subscriptions/[subscriptionId]/loyalty-discount/stay-subscribed/page.tsx
  • Loyalty discount cancel, [locale]/subscriptions/[subscriptionId]/loyalty-discount/cancel/page.tsx

  • We threw errors for customer mismatches

This pull request

  • Updates the following churn pages with a try-catch to gracefully handle backend failures:

    • Loyalty discount stay subscribed error, [locale]/subscriptions/[subscriptionId]/loyalty-discount/stay-subscribed/error/page.tsx
    • Loyalty discount cancel error, [locale]/subscriptions/[subscriptionId]/loyalty-discount/cancel/error/page.tsx
    • Loyalty discount stay subscribed, [locale]/subscriptions/[subscriptionId]/loyalty-discount/stay-subscribed/page.tsx
    • Loyalty discount cancel, [locale]/subscriptions/[subscriptionId]/loyalty-discount/cancel/page.tsx
  • Updates the following backend churn methods with a try-catch to return a general error:

    • determineStaySubscribedEligibility
    • determineCancelInterstitialOfferEligibility
    • determineCancelChurnContentEligibility
    • getCancelFlowContent
    • getStaySubscribedFlowContent
  • Adds customer_mismatch error code / reason to handle customer mismatch on the following:

    • Backend:
      • determineStaySubscribedEligibility
      • determineCancelInterstitialOfferEligibility
      • determineCancelChurnContentEligibility
    • UI:
      • Loyalty Discount Stay subscribed error page (uses components/ChurnError/index.tsx)
      • Loyalty Discount Cancel error page (also uses components/ChurnError/index.tsx)
      • Interstitial Offer error page, [locale]/subscriptions/[subscriptionId]/offer/error/page.tsx

Issue that this pull request solves

Closes #PAY-3513

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Stay Subscribed loyalty discount error:
image

Cancel loyalty discount error:
image

Offer error:
image

Other information (Optional)

Any other information that is important to this pull request.

@elizabeth-ilina elizabeth-ilina force-pushed the PAY-3513-something-went-wrong-stay-subscribed-error-handle branch 13 times, most recently from 27dad1e to b5dce1f Compare February 6, 2026 19:55
@elizabeth-ilina elizabeth-ilina marked this pull request as ready for review February 6, 2026 19:58
@elizabeth-ilina elizabeth-ilina requested review from a team as code owners February 6, 2026 19:58
@elizabeth-ilina elizabeth-ilina marked this pull request as draft February 6, 2026 20:05
@elizabeth-ilina elizabeth-ilina force-pushed the PAY-3513-something-went-wrong-stay-subscribed-error-handle branch 2 times, most recently from 32d3aeb to b222e9a Compare February 6, 2026 20:39
@elizabeth-ilina elizabeth-ilina marked this pull request as ready for review February 6, 2026 20:40
@elizabeth-ilina elizabeth-ilina force-pushed the PAY-3513-something-went-wrong-stay-subscribed-error-handle branch from b222e9a to 72cdc92 Compare February 10, 2026 17:31
…ser that has access to another user's churn coupon email link

Because:

* We did not have general backend error catching for the churn stay subscribed page.

This commit:

* Updates the churn stay subscribed page (and maybe others? - todo: check others) with a try-catch to gracefully handle backend failures
* Adds customer_mismatch error code / reason to handle customer mismatch on the stay subscribed (and other?? - TODO check) pages.

Closes #[PAY-3513](https://mozilla-hub.atlassian.net/browse/PAY-3513)
@elizabeth-ilina elizabeth-ilina force-pushed the PAY-3513-something-went-wrong-stay-subscribed-error-handle branch from 72cdc92 to d7dd698 Compare February 10, 2026 17:31
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