Skip to content

Commit

Permalink
fix: report chat completion errors (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
codeincontext authored Oct 23, 2024
1 parent c4d85cc commit 13729ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/aila/src/core/chat/AilaStreamHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export class AilaStreamHandler {
this._isStreaming = false;
try {
await this._chat.complete();
} catch (e) {
this._chat.aila.errorReporter?.reportError(e);
throw new AilaChatError("Chat completion failed", { cause: e });
} finally {
this.closeController();
}
Expand Down

0 comments on commit 13729ca

Please sign in to comment.