feat(chat): enhance error formatting to include optional error codes for better frontend handling

This commit is contained in:
Anish Sarkar 2026-04-29 21:05:21 +05:30
parent fa6a09197e
commit 901de33684
4 changed files with 97 additions and 58 deletions

View file

@ -256,7 +256,7 @@ export type SSEEvent =
}>;
};
}
| { type: "error"; errorText: string };
| { type: "error"; errorText: string; errorCode?: string };
/**
* Async generator that reads an SSE stream and yields parsed JSON objects.