A refused plan switch answers 200 and replaces the preview with the plans #195

Open
opened 2026-10-07 12:13:05 +00:00 by cgalo5758 · 0 comments
Owner

When the plan switch or its preview refuses a move (a plan that is no longer offered, a commitment term, a read that failed), the handler answers through renderPlansAfterMove (internal/server/member_products.go) with status 200: the plans region is drawn again with the reason above it, and the preview the member was reading is gone, with the choices they made in it. The member catalog spec requires a refused move to answer 422 with the preview drawn again, every submitted value carried back and the reason in the form's own message slot, and the form conventions make 422 the status of every refusal. Checkout now answers its refusals with 422.

Done when: every refusal of the switch and its preview answers 422 with the preview drawn again, the submitted values kept and the reason in the form-level slot, and tests assert both the status and that the preview stays.

When the plan switch or its preview refuses a move (a plan that is no longer offered, a commitment term, a read that failed), the handler answers through `renderPlansAfterMove` (`internal/server/member_products.go`) with status 200: the plans region is drawn again with the reason above it, and the preview the member was reading is gone, with the choices they made in it. The member catalog spec requires a refused move to answer 422 with the preview drawn again, every submitted value carried back and the reason in the form's own message slot, and the form conventions make 422 the status of every refusal. Checkout now answers its refusals with 422. Done when: every refusal of the switch and its preview answers 422 with the preview drawn again, the submitted values kept and the reason in the form-level slot, and tests assert both the status and that the preview stays.
cgalo5758 added the
kind
bug
area/billingarea/member-ui
labels 2026-10-07 12:13:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#195