Skip to content

[Service] /checkout/quote and /checkout/orders disagree on a priced-but-untitled product #156

Description

@vedanshujain

/checkout/quote and /checkout/orders disagree about a priced-but-untitled product:

  • quote checks the price only (packages/service/src/routes/orders.ts), so it answers 200;
  • place goes through createOrderFromCart, whose null-title guard rejects, so it 409s.

A buyer can therefore be quoted a total for a cart that cannot be placed. Nothing pins the
asymmetry in either direction, so it is not currently a decision — it is an accident.

Two things to settle when this is picked up:

  1. Which behaviour is right — quote should reject too (fail early, consistent), or place should
    tolerate a missing title (which contradicts the order-line snapshot invariant, so probably not).
  2. Pin it with a test either way, so the two endpoints cannot drift again.

Related: the untested title half of the place-side guard is tracked separately.

Source: plans/one-home-per-field.md §7.0, §9.5, §9.7.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions