Show error toast when leads API fails in Leadspeicher
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -443,6 +443,9 @@ export default function LeadVaultPage() {
|
|||||||
setLeads(data.leads);
|
setLeads(data.leads);
|
||||||
setTotal(data.total);
|
setTotal(data.total);
|
||||||
setPages(data.pages);
|
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 {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user