mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 09:51:13 -05:00
Refactor: Implement logging phases
This commit is contained in:
@@ -10,6 +10,7 @@ import { useAuth } from '@/hooks/useAuth';
|
||||
import { MFAChallenge } from '@/components/auth/MFAChallenge';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
import type { UserRole } from '@/hooks/useUserRole';
|
||||
import { handleError } from '@/lib/errorHandler';
|
||||
|
||||
interface AdminUserDeletionDialogProps {
|
||||
open: boolean;
|
||||
@@ -131,7 +132,10 @@ export function AdminUserDeletionDialog({
|
||||
}, 2000);
|
||||
|
||||
} catch (err) {
|
||||
console.error('Error deleting user:', err);
|
||||
handleError(err, {
|
||||
action: 'Delete User',
|
||||
metadata: { targetUserId: targetUser.userId }
|
||||
});
|
||||
setError(err instanceof Error ? err.message : 'Failed to delete user');
|
||||
setStep('final_confirm');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user