forked from viewit/KX-Bridge-Release
The printer replies with state="failed" and data as a 2-element list (["multi_color_box", [...]]) instead of the usual dict when it rejects a manual ACE slot filament assignment (e.g. custom-RFID/third-party material). _on_multicolor_box called data.get(...) unconditionally, crashing with AttributeError and silently dropping the report - including the regular slot-state update that would otherwise follow. Add a state="failed" guard plus a defensive isinstance check, and surface the rejection via _state["last_ams_set_error"] so the caller of handle_api_ams_set_slot's optimistic cache update isn't left showing a false success. Note: this fixes the crash, not necessarily the underlying rejection itself - the printer/ACE may still refuse assignments for material types it doesn't recognize.