mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-29 22:27:09 -05:00
Fix error handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user