mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 23:11:23 -05:00
Refactor: Implement full error logging
This commit is contained in:
@@ -5,7 +5,7 @@ import { RefreshButton } from '@/components/ui/refresh-button';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
|
||||
import { validateEntityData, ValidationResult } from '@/lib/entityValidationSchemas';
|
||||
import { logger } from '@/lib/logger';
|
||||
import { handleNonCriticalError } from '@/lib/errorHandler';
|
||||
|
||||
import type { SubmissionItemData } from '@/types/moderation';
|
||||
|
||||
@@ -92,10 +92,9 @@ export function ValidationSummary({ item, onValidationChange, compact = false, v
|
||||
setValidationResult(result);
|
||||
onValidationChange?.(result);
|
||||
} catch (error: unknown) {
|
||||
logger.error('Entity validation failed', {
|
||||
action: 'validate_entity',
|
||||
entityType: item.item_type,
|
||||
error: error instanceof Error ? error.message : String(error)
|
||||
handleNonCriticalError(error, {
|
||||
action: 'Validate entity',
|
||||
metadata: { entityType: item.item_type }
|
||||
});
|
||||
setValidationResult({
|
||||
isValid: false,
|
||||
|
||||
Reference in New Issue
Block a user