Show error toast when leads API fails in Leadspeicher

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Timo Uttenweiler
2026-04-09 11:40:37 +02:00
parent 3063c0860d
commit 2c9afe76cf

View File

@@ -443,6 +443,9 @@ export default function LeadVaultPage() {
setLeads(data.leads);
setTotal(data.total);
setPages(data.pages);
} else {
const err = await res.json().catch(() => ({})) as { error?: string };
toast.error(`Leads konnten nicht geladen werden: ${err.error || res.status}`);
}
} finally {
setLoading(false);