Return 404 when order item not found in DELETE /order/items

This commit is contained in:
copilot-swe-agent[bot]
2026-07-06 23:19:00 +00:00
committed by GitHub
parent e4465d9d91
commit d9fbba3130
@@ -204,6 +204,8 @@ class orderItemsRoute
$response->error('Order not found', 404);
}
self::requireDepartmentAccess((string)(int)$orderForAccess->department_id->value());
} else {
$response->error('Order item not found', 404);
}
// Delete the order item
(new order_items_o())->removeOrderItem((int)$data['id']);