mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-27 00:52:05 +00:00
fix: trigger model fallback on HTTP 503 Service Unavailable (#55178)
This commit is contained in:
committed by
Peter Steinberger
parent
5d91b68af3
commit
517ae6ea14
@@ -488,7 +488,9 @@ export function createOllamaStreamFn(
|
||||
|
||||
if (!response.ok) {
|
||||
const errorText = await response.text().catch(() => "unknown error");
|
||||
throw new Error(`Ollama API error ${response.status}: ${errorText}`);
|
||||
const err = new Error(`${response.status} ${errorText}`);
|
||||
(err as Error & { status: number }).status = response.status;
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (!response.body) {
|
||||
|
||||
Reference in New Issue
Block a user