feat: Add error handling for fetching Ollama URL

This commit is contained in:
n4ze3m 2025-01-24 22:36:46 +05:30
parent 97daaf9dc2
commit c2c80e2226

View File

@ -15,9 +15,14 @@ export const SettingsOllama = () => {
const { status } = useQuery({
queryKey: ["fetchOllamURL"],
queryFn: async () => {
try {
const [ollamaURL] = await Promise.all([getOllamaURL()])
setOllamaURL(ollamaURL)
return {}
} catch (e) {
console.error(e)
return {}
}
}
})