mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 19:11:13 -05:00
feat: Complete app-wide error coverage
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user