Repository navigation
[backport core/1.55] fix(billing-web): re-quote on QUOTE_STALE in the full-page checkout #19643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,10 +12,7 @@ import { | |
| import type { InlineOutcome, OperationOutcome } from '@/checkout/checkoutPage' | ||
|
|
||
| /** The server refused the quote the customer consented to; re-price before asking again. */ | ||
| const STALE_QUOTE_SERVER_CODES = [ | ||
| 'PRORATION_QUOTE_EXPIRED', | ||
| 'SUBSCRIPTION_QUOTE_STALE' | ||
| ] as const | ||
| const STALE_QUOTE_SERVER_CODES = ['PRORATION_QUOTE_EXPIRED'] as const | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — |
||
|
|
||
| /** | ||
| * What a Pay's result asks of the page. `settled` needs nothing from | ||
|
|
@@ -39,6 +36,8 @@ export function payVerdictOf(result: SubscriptionCommandResult): PayVerdict { | |
| ) | ||
| return { kind: 'requote', because: 'quote_expired' } | ||
| switch (result.code) { | ||
| case 'QUOTE_STALE': | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Low — Dropping |
||
| return { kind: 'requote', because: 'quote_expired' } | ||
| case 'REACTIVATION_CONFIRMATION_REQUIRED': | ||
| return { kind: 'requote', because: 'reactivation_required' } | ||
| case 'OPERATION_ALREADY_PENDING': | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Low — This row was replaced rather than added alongside, so nothing in the suite still covers a
REQUEST_FAILEDfailure carryingserverCode: 'SUBSCRIPTION_QUOTE_STALE'— exactly the shape whose verdict changed from requote to a hard failure. The remaining server-code row also builds its fixture withrefusedWith, which hardcodeshttpStatus: 409, so the status-blindPRORATION_QUOTE_EXPIREDmatch is never exercised with a 5xx; keep both rows and add a 5xx case. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).