fix(migrate): answer a past_due subscription with its own provision code - #412
Merged
Merged
Conversation
When every owned workspace holds a subscription, the provision 409 carried subscription_exists for a plan that is ending and for one whose payment failed alike, so Migrate showed the "ending" screen for both. A workspace whose subscription is past_due now answers subscription_past_due (and the attach_past_due message); the way out there is to fix the payment.
Member
Author
|
ONAY on cf403a9 (local checks).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When every workspace the customer owns already holds a subscription,
POST /api/migrate/provisionanswered 409subscription_existsfor a plan that is ending and for one whose last payment failed alike, so Migrate showed "Your Studio plan is ending" for a past_due plan (found in the E2E runbook review).A blocked workspace whose subscription is
past_duenow answers 409 withdata.code: 'subscription_past_due'(messagemigrate.attach_past_due, the key the attach route already uses) and the sameworkspace_slug. Ending and other live subscriptions keepsubscription_exists.Evidence
migrate-provision.test.ts: new test (past_due → key +datacode/slug, nothing claimed); the existing "ending" and "already pays" tests unchanged and green. migrate-grant-routes tests green, eslint clean.Migrate half: migrate PR follows (its own panel for the new code).
Reviewer: t6