mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 17:05:16 -05:00
fix: connection check shows Network Problem instead of the real error (#35346)
Verifying an Anthropic or Ollama connection with a wrong API key showed only "OpenAI: Network Problem" or "Ollama: Network Problem", while the actual reason from the provider was there but got lost. The toast now shows the provider's error, and OpenAI-compatible connections still show theirs. Fixes #35345
This commit is contained in:
1 parent
68b0f9e6ea
commit
36522bbbb6
3 files changed
+4
-2
No files matched your search
@@ -1117,6 +1117,8 @@ async def verify_connection(
|
||||
# ClientError covers all aiohttp requests issues
|
||||
log.exception(f'Client error: {str(e)}')
|
||||
raise HTTPException(status_code=500, detail=ERROR_MESSAGES.SERVER_CONNECTION_ERROR)
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
log.exception(f'Unexpected error: {e}')
|
||||
raise HTTPException(status_code=500, detail=ERROR_MESSAGES.SERVER_CONNECTION_ERROR)
|
||||
|
||||
@@ -19,7 +19,7 @@ export const verifyOllamaConnection = async (token: string = '', connection: dic
|
||||
return res.json();
|
||||
})
|
||||
.catch((err) => {
|
||||
error = `Ollama: ${err?.error?.message ?? 'Network Problem'}`;
|
||||
error = `Ollama: ${err?.detail ?? err?.error?.message ?? 'Network Problem'}`;
|
||||
return [];
|
||||
});
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ export const verifyOpenAIConnection = async (
|
||||
return res.json();
|
||||
})
|
||||
.catch((err) => {
|
||||
error = `OpenAI: ${err?.error?.message ?? 'Network Problem'}`;
|
||||
error = `OpenAI: ${err?.detail ?? err?.error?.message ?? 'Network Problem'}`;
|
||||
return [];
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user