fix(ui): MV-14 review — surface SetAttributeOverride failures in InstanceConfigure save loop (no false success toast)

This commit is contained in:
Joseph Doherty
2026-06-16 16:32:28 -04:00
parent 100540b153
commit ca9ee5ea2a
@@ -973,13 +973,20 @@
return;
}
var failures = new List<string>();
foreach (var (attrName, value) in toSave)
{
var result = await InstanceService.SetAttributeOverrideAsync(Id, attrName, value, user);
if (result.IsSuccess)
_existingOverrides[attrName] = result.Value!;
else
failures.Add($"{attrName}: {result.Error}");
}
_toast.ShowSuccess($"Saved {toSave.Count} override(s).");
if (failures.Count > 0)
_toast.ShowError($"Failed to save {failures.Count} override(s): {string.Join("; ", failures)}");
var savedCount = toSave.Count - failures.Count;
if (savedCount > 0)
_toast.ShowSuccess($"Saved {savedCount} override(s).");
}
catch (Exception ex)
{