Spaces:
No application file
No application file
Update src/components/SettingsModal.tsx
Browse files8 unmodified lines9101112131445 unmodified lines606162636465666768698 unmodified linesExternalLink,Sparkles,} from 'lucide-react';interface SettingsModalProps {isOpen: boolean;45 unmodified linessetTestStatus('success');setTestMessage(`Authenticated successfully as @${data.name || data.fullname || 'user'}!`);} else {setTestStatus('error');setTestMessage(`HF authentication failed (${res.status}). Verify your token permissions.`);}} catch (e: any) {setTestStatus('error');setTestMessage(`Connection error: ${e.message || 'Network request failed'}`);}8 unmodified lines910111213141545 unmodified lines616263646566676869707172737475767778798081828384858 unmodified linesExternalLink,Sparkles,} from 'lucide-react';import { logRealConsoleApiError } from '../utils/apiLogger';interface SettingsModalProps {isOpen: boolean;45 unmodified linessetTestStatus('success');setTestMessage(`Authenticated successfully as @${data.name || data.fullname || 'user'}!`);} else {const errBody = await res.text().catch(() => '');logRealConsoleApiError({topic: 'Hugging Face Token Authentication Error',endpoint: 'https://huggingface.co/api/whoami-v2',status: res.status,statusText: res.statusText,message: `Authentication failed with status ${res.status} (${res.statusText || 'Unauthorized'})`,rawResponse: errBody,});setTestStatus('error');setTestMessage(`HF authentication failed (${res.status}). Verify your token permissions.`);}} catch (e: any) {logRealConsoleApiError({topic: 'Hugging Face Token Validation Network Failure',endpoint: 'https://huggingface.co/api/whoami-v2',message: e.message || 'Network request failed or CORS blocked.',error: e,});setTestStatus('error');setTestMessage(`Connection error: ${e.message || 'Network request failed'}`);}
src/components/SettingsModal.tsx+16