diff --git a/frontend/src/hooks/useSetup.ts b/frontend/src/hooks/useSetup.ts index 7ee4a38..9b5c660 100644 --- a/frontend/src/hooks/useSetup.ts +++ b/frontend/src/hooks/useSetup.ts @@ -20,7 +20,7 @@ export interface UseSetupResult { /** User-facing error message from the last status check. */ error: string | null; /** Refresh the setup status from the backend. */ - refresh: () => void; + refresh: () => Promise; /** Whether a submit request is currently in flight. */ submitting: boolean; /** User-facing error message from the last submit attempt. */ @@ -44,7 +44,9 @@ export function useSetup(): UseSetupResult { const resp = await getSetupStatus(); setStatus(resp); } catch (err: unknown) { - setError(err instanceof Error ? err.message : "Failed to fetch setup status"); + const errorMessage = err instanceof Error ? err.message : "Failed to fetch setup status"; + console.warn("Setup status check failed:", errorMessage); + setError(errorMessage); } finally { setLoading(false); }