Fix product detail 404 — /products/{id} returns 404 in fixture mode #28
Labels
No labels
meeting-notes
meeting-sensitive
meeting-transcript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/home#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
GET /api/products/prod_gw_belgium01 returns 404 even though the product exists in the fixture data (visible in /api/products/featured).
The product listing endpoint works but individual product lookup by ID fails.
Impact
Root cause
Need to investigate: ProductService.get_product_by_id() in fixtures — the product catalog loads from JSON files but the ID lookup may not match.
Fix
Debug FixtureProductCatalog::get_product_by_id() and verify it searches by the correct ID field.
Test
Signed-off-by: mik-tf
Fixed — v1.3.2
Root cause
Axum 0.7.9 uses
:idsyntax for path parameters, not{id}. The{id}syntax silently does not match, returning 404 for ALL parameterized routes.Fix
{id}to:idin routes.rs (40+ routes affected)get_product_detailsnow returns JSON (was rendering SSR HTML template)Test-driven fix
success: True product: Belgium Gateway - BrusselsRegression test added
api_integration.sh now has: "Product detail by ID → found"
Signed-off-by: mik-tf