diff --git a/app/api/webdav/[...path]/route.ts b/app/api/webdav/[...path]/route.ts index 81ede0fd8..56c2388ae 100644 --- a/app/api/webdav/[...path]/route.ts +++ b/app/api/webdav/[...path]/route.ts @@ -101,6 +101,7 @@ async function handle( authorization: req.headers.get("authorization") ?? "", }, body: shouldNotHaveBody ? null : req.body, + redirect: 'manual', method, // @ts-ignore duplex: "half", diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 629158843..78e628ad7 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -151,6 +151,9 @@ export class ChatGPTApi implements LLMApi { if (finished || controller.signal.aborted) { responseText += remainText; console.log("[Response Animation] finished"); + if (responseText?.length === 0) { + options.onError?.(new Error("empty response from server")); + } return; }