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

added UI Error display for failed retry on message #733

Merged
merged 2 commits into from
Nov 16, 2024
Merged

added UI Error display for failed retry on message #733

merged 2 commits into from
Nov 16, 2024

Conversation

hpatel292-seneca
Copy link
Collaborator

This Fixes #716

Changes

Update the catch block for retry from this

catch (err) {
        // TODO: UI error handling
        console.warn("Unable to retry message", { model, err });
      }

to this

catch (err: any) {
        error({
          title: `Response Error`,
          message: err.message,
        });
        console.warn("Unable to retry message", { model, err });
      }

Here is the demo:

2024-11-16.09-49-45.mp4

Copy link
Collaborator

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Nice!

You need to add error to your deps for this useEffect

Also, let's change the title from Response Error to Retry Error

Copy link

cloudflare-workers-and-pages bot commented Nov 16, 2024

Deploying chatcraft-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 93686eb
Status: ✅  Deploy successful!
Preview URL: https://f685257c.console-overthinker-dev.pages.dev
Branch Preview URL: https://issue-716.console-overthinker-dev.pages.dev

View logs

@humphd humphd merged commit d6e5cb0 into main Nov 16, 2024
4 checks passed
@humphd humphd deleted the issue-716 branch November 16, 2024 19:25
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.

Sometime AI message retry is failing.
2 participants