mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
AIX: client error: describe Failed to fetch
This happens when for instance Chrome queues up a connection, and while still queued the WiFi goes off.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user