feat: Complete app-wide error coverage

This commit is contained in:
gpt-engineer-app[bot]
2025-11-04 19:58:20 +00:00
parent d9bd7c1616
commit a649906b61
22 changed files with 111 additions and 57 deletions

View File

@@ -12,7 +12,7 @@ import { ArrowLeft, MapPin, Star, Globe, Calendar, Edit, Ruler } from 'lucide-re
import { Company } from '@/types/database';
import { supabase } from '@/lib/supabaseClient';
import { DesignerPhotoGallery } from '@/components/companies/DesignerPhotoGallery';
import { logger } from '@/lib/logger';
import { handleNonCriticalError } from '@/lib/errorHandler';
// Lazy load admin form
const DesignerForm = lazy(() => import('@/components/admin/DesignerForm').then(m => ({ default: m.DesignerForm })));
@@ -82,7 +82,10 @@ export default function DesignerDetail() {
fetchStatistics(data.id);
}
} catch (error) {
logger.error('Error fetching designer', { error });
handleNonCriticalError(error, {
action: 'Fetch designer',
metadata: { slug }
});
} finally {
setLoading(false);
}
@@ -109,7 +112,10 @@ export default function DesignerDetail() {
if (photosError) throw photosError;
setTotalPhotos(photosCount || 0);
} catch (error) {
logger.error('Error fetching statistics', { error });
handleNonCriticalError(error, {
action: 'Fetch designer statistics',
metadata: { designerId }
});
} finally {
setStatsLoading(false);
}