feat: Add error handling for fetching Ollama URL
This commit is contained in:
parent
97daaf9dc2
commit
c2c80e2226
@ -15,9 +15,14 @@ export const SettingsOllama = () => {
|
||||
const { status } = useQuery({
|
||||
queryKey: ["fetchOllamURL"],
|
||||
queryFn: async () => {
|
||||
const [ollamaURL] = await Promise.all([getOllamaURL()])
|
||||
setOllamaURL(ollamaURL)
|
||||
return {}
|
||||
try {
|
||||
const [ollamaURL] = await Promise.all([getOllamaURL()])
|
||||
setOllamaURL(ollamaURL)
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
return {}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user