Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

refactor(AIProviders): early exit on empty samples and log batch creation errors (#4032)

[._.]/ Adam Eivyb8d23f5ea124
diff --git a/client/src/pages/AIProviders.jsx b/client/src/pages/AIProviders.jsx
index 1e4b10b8a3..b4255e20c2 100644
--- a/client/src/pages/AIProviders.jsx
+++ b/client/src/pages/AIProviders.jsx
@@ -239,6 +239,8 @@ export default function AIProviders() {
};
const handleAddAllSamples = async () => {
+ if (sampleProviders.length === 0) return;
+
const succeededIds = [];
const failedIds = [];
@@ -247,6 +249,7 @@ export default function AIProviders() {
await api.createProvider(provider);
succeededIds.push(provider.id);
} catch (err) {
+ console.error(`Failed to add sample provider ${provider.name || provider.id}:`, err);
failedIds.push(provider.id);
}
}