feat: Complete error logging coverage

This commit is contained in:
gpt-engineer-app[bot]
2025-11-04 19:30:56 +00:00
parent 9bf5ea322e
commit 162d288cb0
13 changed files with 50 additions and 53 deletions

View File

@@ -179,14 +179,14 @@ export function useQueueQuery(config: UseQueueQueryConfig): UseQueueQueryReturn
if (result.error) {
const specificMessage = getSpecificErrorMessage(result.error);
logger.error('❌ [TanStack Query] Error:', { error: specificMessage });
// Error already captured in context
throw new Error(specificMessage);
}
// Validate data shape before returning
const validation = validateModerationItems(result.submissions);
if (!validation.success) {
logger.error('❌ Invalid data shape', { error: validation.error });
// Invalid data shape
throw new Error(validation.error || 'Invalid data format');
}