Docs: OPENAPI wording for duplicate SKU is stale — should say "exists in Woo, any status" #3

Closed
opened 2026-09-01 20:31:10 +00:00 by Ty · 2 comments
Owner

During the docs/refactor-v2 review, found a residual stale line in OPENAPI: it says a duplicate SKU means "already published," but the preferred wording is "exists in Woo, any status."

This is exactly the kind of stale line the refactor was meant to catch. Not a blocker, but should be fixed before merge.

Source: doc review of docs/refactor-v2, 2026-09-01.

During the docs/refactor-v2 review, found a residual stale line in OPENAPI: it says a duplicate SKU means "already published," but the preferred wording is "exists in Woo, any status." This is exactly the kind of stale line the refactor was meant to catch. Not a blocker, but should be fixed before merge. Source: doc review of docs/refactor-v2, 2026-09-01.
Ty added this to the POC milestone 2026-09-01 23:49:50 +00:00
Author
Owner

Test cases needed once implementation exists:

  1. Duplicate SKU detection — POST /slabs with an existing SKU returns 409 with the correct error envelope: { "error": { "code": "duplicate_sku", "message": "SKU already exists in WooCommerce, any status.", "detail": { "field": "sku", "actions": ["edit_sku", "open_existing"], ... } }.
  2. Any-status dedupe — Duplicate SKU check scans all Woo statuses (draft, private, publish, trash), not just published products.
  3. No second product — 409 path does not create a duplicate Woo product.
  4. UI never shows raw code — The user sees "This SKU already exists in the store" on the SKU field, not "409" or "duplicate_sku".
Test cases needed once implementation exists: 1. **Duplicate SKU detection** — POST /slabs with an existing SKU returns 409 with the correct error envelope: `{ "error": { "code": "duplicate_sku", "message": "SKU already exists in WooCommerce, any status.", "detail": { "field": "sku", "actions": ["edit_sku", "open_existing"], ... } }`. 2. **Any-status dedupe** — Duplicate SKU check scans all Woo statuses (draft, private, publish, trash), not just published products. 3. **No second product** — 409 path does not create a duplicate Woo product. 4. **UI never shows raw code** — The user sees "This SKU already exists in the store" on the SKU field, not "409" or "duplicate_sku".
Owner

Verified in main @ 0c00d25: docs/contracts/API.md:58 "SKU exists in Woo under any status"; UX.md:81,100 same wording. Backend says "SKU already exists". Fixed.

Verified in main @ 0c00d25: docs/contracts/API.md:58 "SKU exists in Woo under any status"; UX.md:81,100 same wording. Backend says "SKU already exists". Fixed.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Ty_Tech/SlabUploader#3