Fixed error handling

This commit is contained in:
2026-09-27 14:35:52 +02:00
parent 9ba48de55b
commit 0d626fd84a
5 changed files with 214 additions and 90 deletions
@@ -111,7 +111,7 @@ export const SiteVisitsPage: React.FC = () => {
visitForm.reset();
success('Site Visit Logged', 'Field inspection recorded with inspector findings.');
},
onError: (err: any) => toastError('Logging Failed', err.message || 'Unable to save site visit.'),
onError: (err: any) => toastError('Logging Failed', err),
});
const updateVisitMutation = useMutation({
@@ -132,7 +132,7 @@ export const SiteVisitsPage: React.FC = () => {
visitForm.reset();
success('Site Visit Updated', 'Inspection report and verification status updated.');
},
onError: (err: any) => toastError('Update Failed', err.message || 'Unable to update site visit.'),
onError: (err: any) => toastError('Update Failed', err),
});
// Filtered & Sorted Visits