Files
bambuddy/backend
maziggy 5d400d2e6e fix(cloud): send required ?version= param on singular GET/DELETE of slicer setting endpoint (#1815)
get_setting_detail and delete_setting were hitting
    /v1/iot-service/api/slicer/setting/{id} without the version query
    parameter Bambu Cloud requires — every call returned HTTP 400
    "field 'version' is not set". The sibling plural GET
    (get_slicer_settings) has always sent it; the comment above
    _SLICER_API_VERSION documents the contract for the endpoint subtree.
    Missed when the placeholder landed in the 2026-05-12 compliance rework.

    Downstream effect: slicer_filament_resolver.resolve_slicer_filament's
    PFUS branch swallowed the 400, fell through to normalize_slicer_filament,
    and caller inventory.py generic-material-fell-back tray_info_idx to
    GFL99/GFG99. BambuStudio's AMS panel reads the printer's tray_info_idx
    echo, so the user saw "Generic PLA" instead of the custom cloud preset.

    Masked for 50 days by two rescue paths in the caller: prior-slot
    tray_info_idx reuse, and stored spool_k_profile → live state.kprofiles
    realign. Reporter's spool 54 → tray 2 assign had neither.

    Adjacent surfaces also fixed by the same two-line change: the delete
    cloud preset UI route, the whole update_setting flow (get_setting_detail
    → delete_setting → POST), preset_resolver's cloud branch, and three
    UI-facing cloud.py routes that fetch setting detail.

    get_setting_detail also includes the truncated response body in the
    raised BambuCloudError so the next contract change is self-diagnostic
    from support-bundle logs.
2026-07-07 10:57:33 +02:00
..