mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 09:11:13 -05:00
feat: Complete error logging coverage
This commit is contained in:
@@ -280,7 +280,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
}
|
||||
});
|
||||
} catch (auditError) {
|
||||
logger.error('Failed to log review moderation audit', { error: auditError });
|
||||
// Silent - audit logging is non-critical
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
queryClient.setQueryData(['moderation-queue'], context.previousData);
|
||||
}
|
||||
|
||||
logger.error('❌ Error performing action:', { error: getErrorMessage(error) });
|
||||
// Error already logged by mutation, just show toast
|
||||
toast({
|
||||
title: 'Action Failed',
|
||||
description: getErrorMessage(error) || `Failed to ${variables.action} content`,
|
||||
@@ -395,7 +395,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
}
|
||||
});
|
||||
} catch (auditError) {
|
||||
logger.error('Failed to log submission deletion audit', { error: auditError });
|
||||
// Silent - audit logging is non-critical
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
|
||||
logger.log(`✅ Submission ${item.id} deleted`);
|
||||
} catch (error: unknown) {
|
||||
logger.error('❌ Error deleting submission:', { error: getErrorMessage(error) });
|
||||
// Error already handled, just show toast
|
||||
toast({
|
||||
title: 'Error',
|
||||
description: getErrorMessage(error),
|
||||
@@ -444,7 +444,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
}
|
||||
});
|
||||
} catch (auditError) {
|
||||
logger.error('Failed to log submission reset audit', { error: auditError });
|
||||
// Silent - audit logging is non-critical
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
|
||||
logger.log(`✅ Submission ${item.id} reset to pending`);
|
||||
} catch (error: unknown) {
|
||||
logger.error('❌ Error resetting submission:', { error: getErrorMessage(error) });
|
||||
// Error already handled, just show toast
|
||||
toast({
|
||||
title: 'Reset Failed',
|
||||
description: getErrorMessage(error),
|
||||
@@ -516,7 +516,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
}
|
||||
});
|
||||
} catch (auditError) {
|
||||
logger.error('Failed to log submission retry audit', { error: auditError });
|
||||
// Silent - audit logging is non-critical
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ export function useModerationActions(config: ModerationActionsConfig): Moderatio
|
||||
|
||||
logger.log(`✅ Retried ${failedItems.length} failed items for ${item.id}`);
|
||||
} catch (error: unknown) {
|
||||
logger.error('❌ Error retrying items:', { error: getErrorMessage(error) });
|
||||
// Error already handled, just show toast
|
||||
toast({
|
||||
title: 'Retry Failed',
|
||||
description: getErrorMessage(error) || 'Failed to retry items',
|
||||
|
||||
Reference in New Issue
Block a user