mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-23 22:20:23 +09:00
Update app/client/platforms/bedrock.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
a0886875e1
commit
44a1cf6d6e
@ -826,21 +826,26 @@ function bedrockStream(
|
||||
index = result.index;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("[Bedrock Stream Error]:", err);
|
||||
throw err;
|
||||
console.error(
|
||||
"[Bedrock Stream]:",
|
||||
err instanceof Error ? err.message : "Stream processing failed"
|
||||
);
|
||||
throw new Error("Failed to process stream response");
|
||||
} finally {
|
||||
reader.releaseLock();
|
||||
finish();
|
||||
}
|
||||
} catch (e) {
|
||||
// @ts-ignore
|
||||
if (e.name === "AbortError") {
|
||||
if (e instanceof Error && e.name === "AbortError") {
|
||||
console.log("[Bedrock Client] Aborted by user");
|
||||
return;
|
||||
}
|
||||
console.error("[Bedrock Request] error", e);
|
||||
console.error(
|
||||
"[Bedrock Request] Failed:",
|
||||
e instanceof Error ? e.message : "Request failed"
|
||||
);
|
||||
options.onError?.(e);
|
||||
throw e;
|
||||
throw new Error("Request processing failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user