Skip to content

feat: Error handling for companion#3792

Merged
chriskari merged 11 commits intokyma-project:mainfrom
chriskari:ai-error-handling
Apr 2, 2025
Merged

feat: Error handling for companion#3792
chriskari merged 11 commits intokyma-project:mainfrom
chriskari:ai-error-handling

Conversation

@chriskari
Copy link
Contributor

@chriskari chriskari commented Mar 25, 2025

Description

Changes proposed in this pull request:

  • errors are now only handled after the final chunk was received, not with intermediate steps
  • retry-button is only displayed if final chunk has property error !== null or every single chunk has status === "error"
  • remove handleError from follow-ups
  • display error notice next to user's messages that cause an error and have not been retried

Related issue(s)

Definition of done

  • The PR's title starts with one of the following prefixes:
    • feat: A new feature
    • fix: A bug fix
    • docs: Documentation only changes
    • refactor: A code change that neither fixes a bug nor adds a feature
    • test: Adding tests
    • revert: Revert commit
    • chore: Maintainance changes to the build process or auxiliary tools, libraries, workflows, etc.
  • Related issues are linked. To link internal trackers, use the issue IDs like backlog#4567
  • Explain clearly why you created the PR and what changes it introduces
  • All necessary steps are delivered, for example, tests, documentation, merging

@chriskari chriskari linked an issue Mar 25, 2025 that may be closed by this pull request
6 tasks

const promptSuggestions = (await response.json()).promptSuggestions;
if (!promptSuggestions) {
throw new Error('No follow-up qeustions available');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new Error('No follow-up qeustions available');
throw new Error('No follow-up questions available');

@chriskari chriskari merged commit ece33bd into kyma-project:main Apr 2, 2025
19 checks passed
@chriskari chriskari deleted the ai-error-handling branch April 17, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance error handling of companion

4 participants