Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: thread error handling #4307

Merged
merged 1 commit into from
Dec 20, 2024
Merged

fix: thread error handling #4307

merged 1 commit into from
Dec 20, 2024

Conversation

louis-menlo
Copy link
Contributor

@louis-menlo louis-menlo commented Dec 20, 2024

Describe Your Changes

Fixed the issue where cleaning the thread raises an error, preventing it from being cleaned.

Changes made

The changes in this pull request involve the following updates:

ModelHandler.tsx

  1. Simplified the conditions in the generateThreadTitle function:
    • Removed unnecessary braces and reduced lines by combining conditions.
    • Added a .catch(console.error) to handle errors in a promise chain.

useDeleteThread.ts

  1. Updated the useDeleteThread function:
    • Added code to filter out the deleted thread and update the thread state accordingly.
    • Added a .catch(console.error) to handle errors in a promise chain.

These changes aim to streamline the code and improve error handling.

@github-actions github-actions bot added the type: bug Something isn't working label Dec 20, 2024
Copy link
Contributor

Barecheck - Code coverage report

Total: 68.72%

Your code coverage diff: 0.02% ▴

Uncovered files and lines
FileLines
web/hooks/useDeleteThread.ts79-80

@louis-menlo louis-menlo merged commit 1acbb33 into main Dec 20, 2024
15 of 16 checks passed
@louis-menlo louis-menlo deleted the fix/thread-error-handling branch December 20, 2024 09:55
@github-actions github-actions bot added this to the v0.5.12 milestone Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants