Fix error handling

This commit is contained in:
gpt-engineer-app[bot]
2025-11-05 00:54:12 +00:00
parent df9f997c64
commit 5985ee352d
4 changed files with 41 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ import { MFAChallenge } from './MFAChallenge';
import { Shield, AlertCircle, Loader2 } from 'lucide-react';
import { getEnrolledFactors } from '@/lib/authService';
import { useAuth } from '@/hooks/useAuth';
import { handleError } from '@/lib/errorHandler';
interface AutoMFAVerificationModalProps {
open: boolean;
@@ -46,7 +47,10 @@ export function AutoMFAVerificationModal({
}
} catch (err) {
setError('Failed to load MFA settings. Please try again.');
console.error('Failed to fetch MFA factors:', err);
handleError(err, {
action: 'Fetch MFA Factors for Auto-Verification',
metadata: { context: 'AutoMFAVerificationModal' }
});
} finally {
setLoading(false);
}