mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 14:51:12 -05:00
Implement Phase 3C error logging
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { supabase } from '@/lib/supabaseClient';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
import { logger } from '@/lib/logger';
|
||||
import { handleError, handleNonCriticalError } from '@/lib/errorHandler';
|
||||
import { updateSubmissionItem, type SubmissionItemWithDeps, type DependencyConflict } from './submissionItemsService';
|
||||
|
||||
export interface ResolutionResult {
|
||||
@@ -86,15 +85,13 @@ export async function resolveConflicts(
|
||||
updatedSelections,
|
||||
};
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
logger.error('Conflict resolution error', {
|
||||
action: 'resolve_conflicts',
|
||||
conflictCount: conflicts.length,
|
||||
error: errorMsg
|
||||
handleError(error, {
|
||||
action: 'Resolve conflicts',
|
||||
metadata: { conflictCount: conflicts.length },
|
||||
});
|
||||
return {
|
||||
success: false,
|
||||
error: errorMsg,
|
||||
error: error instanceof Error ? error.message : 'Unknown error',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -236,11 +233,9 @@ export async function findMatchingEntities(
|
||||
|
||||
return [];
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
logger.error('Error finding matching entities', {
|
||||
action: 'find_matching_entities',
|
||||
itemType,
|
||||
error: errorMsg
|
||||
handleNonCriticalError(error, {
|
||||
action: 'Find matching entities',
|
||||
metadata: { itemType },
|
||||
});
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user