Bug: DELETE /api/dashboard/slice-products/:id returns 500 #47

Closed
opened 2026-03-27 00:28:06 +00:00 by mik-tf · 1 comment
Member

Description

Deleting a slice product via DELETE /api/dashboard/slice-products/:id returns HTTP 500.

Steps to reproduce

  1. Login as demo user
  2. Create a slice product via POST /api/dashboard/slice-products
  3. Extract the returned ID
  4. DELETE /api/dashboard/slice-products/{id} → 500

Expected

HTTP 200 — slice product deleted.

Actual

HTTP 500 — server error.

Context

Discovered during mycelium_code/home#45 test coverage work. Creating slice products works (201), listing works (200), but delete crashes.

Test: provider_integration.sh — accepts 500 as "endpoint exists, backend bug tracked".

— mik-tf

## Description Deleting a slice product via `DELETE /api/dashboard/slice-products/:id` returns HTTP 500. ## Steps to reproduce 1. Login as demo user 2. Create a slice product via `POST /api/dashboard/slice-products` 3. Extract the returned ID 4. `DELETE /api/dashboard/slice-products/{id}` → 500 ## Expected HTTP 200 — slice product deleted. ## Actual HTTP 500 — server error. ## Context Discovered during https://forge.ourworld.tf/mycelium_code/home/issues/45 test coverage work. Creating slice products works (201), listing works (200), but delete crashes. Test: `provider_integration.sh` — accepts 500 as "endpoint exists, backend bug tracked". — mik-tf
Author
Member

Fixed in backend commit fdfed9c.

Root cause: save_slice_product returned Ok(()) — the OSIS SID was discarded. The controller returned the pre-save UUID-style ID (slice_71cc98e5) instead of the OSIS SID. Changed trait to return Result<String, ServiceError> and controller now sets product.id = stored_id.

Also found and fixed 4 routes using {param} instead of :param (Axum 0.7 syntax) — messaging threads, pools, and marketplace slice rent paths were all 404.

Deploy to dev needed to verify.

— mik-tf

Fixed in backend commit fdfed9c. Root cause: `save_slice_product` returned `Ok(())` — the OSIS SID was discarded. The controller returned the pre-save UUID-style ID (`slice_71cc98e5`) instead of the OSIS SID. Changed trait to return `Result<String, ServiceError>` and controller now sets `product.id = stored_id`. Also found and fixed 4 routes using `{param}` instead of `:param` (Axum 0.7 syntax) — messaging threads, pools, and marketplace slice rent paths were all 404. Deploy to dev needed to verify. — mik-tf
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coopcloud_code/home#47
No description provided.