diff --git a/src/modules/aix/client/aix.client.errors.ts b/src/modules/aix/client/aix.client.errors.ts index fae3874c8..c8d2c10da 100644 --- a/src/modules/aix/client/aix.client.errors.ts +++ b/src/modules/aix/client/aix.client.errors.ts @@ -50,6 +50,13 @@ export function aixClassifyStreamingError(error: any, isUserAbort: boolean, hasF // Initial connection failures, HTTP errors, or text responses that blow up tRPC's JSON parser if (error instanceof TRPCClientError) { switch (error.cause?.message) { + /** + * When network is disconnected while a request hasn't started (is queued by the browser). + * - repro: queue up > 6 connections, then turn WiFi off (no CSF). + */ + case 'Failed to Fetch': + return { errorType: 'net-disconnected', errorMessage: 'An issue occurred: **network error**' }; + /** * The body of the response was "Request Entity Too Large". * - this caused trpc, in ...stream/jsonl.ts, function createConsumerStream, to throw an error due to parsing the line as JSON