Refactor: Implement full error logging

This commit is contained in:
gpt-engineer-app[bot]
2025-11-04 19:23:28 +00:00
parent 3d646ec6f7
commit 9bf5ea322e
20 changed files with 75 additions and 122 deletions

View File

@@ -17,7 +17,7 @@ import { useSuperuserGuard } from '@/hooks/useSuperuserGuard';
import { IntegrationTestRunner as TestRunner, allTestSuites, type TestResult } from '@/lib/integrationTests';
import { Play, Square, Download, ChevronDown, CheckCircle2, XCircle, Clock, SkipForward } from 'lucide-react';
import { toast } from 'sonner';
import { logger } from '@/lib/logger';
import { handleError } from '@/lib/errorHandler';
export function IntegrationTestRunner() {
const superuserGuard = useSuperuserGuard();
@@ -67,8 +67,11 @@ export function IntegrationTestRunner() {
} else {
toast.success(`All ${summary.passed} tests passed!`);
}
} catch (error) {
logger.error('Test run error', { error });
} catch (error: unknown) {
handleError(error, {
action: 'Run integration tests',
metadata: { suitesCount: suitesToRun.length }
});
toast.error('Test run failed');
} finally {
setIsRunning(false);