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