Skip to content

Assist: gracefully handle errors on the frontend#27669

Merged
justinas merged 1 commit intomasterfrom
justinas/assist-error-handling
Jun 13, 2023
Merged

Assist: gracefully handle errors on the frontend#27669
justinas merged 1 commit intomasterfrom
justinas/assist-error-handling

Conversation

@justinas
Copy link
Copy Markdown
Contributor

@justinas justinas commented Jun 9, 2023

Fixes https://github.com/gravitational/teleport.e/issues/1489

  • Present an error message to the user and toggle off the "responding" state instead of spinning forever
  • Open a new WS connection when the user tries sending a message again
  • Hide the concrete error from the user, include it in the log instead.
    • Trying to strike a balance here: in Cloud, errors (other than rate-limit) are not actionable by the user, so we probably should not expose the error code etc. to them.

For now errors do not have styling distinct from normal messages. I experimented with some approaches, but did not particularly like any of them 😅 I'm open to ideas if this is deemed important.

Screenshot 2023-06-09 at 17 22 46

@ryanclark ryanclark force-pushed the ryan/new-assist-ui branch from 867faeb to b10beef Compare June 9, 2023 14:30
@justinas justinas force-pushed the justinas/assist-error-handling branch from cf9249b to 0a6e4e7 Compare June 9, 2023 14:39
@justinas justinas changed the title Justinas/assist error handling Assist: gracefully handle errors on the frontend Jun 9, 2023
@justinas justinas marked this pull request as ready for review June 9, 2023 15:02
@github-actions github-actions Bot requested review from kimlisa and ryanclark June 9, 2023 15:02
Copy link
Copy Markdown
Member

@ryanclark ryanclark left a comment

Choose a reason for hiding this comment

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

Nice!

@ryanclark ryanclark force-pushed the ryan/new-assist-ui branch 2 times, most recently from 1663c4c to b949dd5 Compare June 12, 2023 20:03
Base automatically changed from ryan/new-assist-ui to master June 13, 2023 09:50
@justinas justinas force-pushed the justinas/assist-error-handling branch from 0a6e4e7 to 6674078 Compare June 13, 2023 12:02
@justinas justinas enabled auto-merge June 13, 2023 20:14
@justinas justinas added this pull request to the merge queue Jun 13, 2023
Merged via the queue into master with commit cf08ae3 Jun 13, 2023
@justinas justinas deleted the justinas/assist-error-handling branch June 13, 2023 20:34
@public-teleport-github-review-bot
Copy link
Copy Markdown

@justinas See the table below for backport results.

Branch Result
branch/v13 Failed

@public-teleport-github-review-bot
Copy link
Copy Markdown

@justinas See the table below for backport results.

Branch Result
branch/v13 Failed

justinas added a commit that referenced this pull request Jun 19, 2023
* Return errors over Assist WS (#27174)

* Return errors over Assist WS

* Add test

* Address code review comments
Add check for the close message in assist WS

* Use UTC for getting time

* Gracefully handle errors in Assist frontend (#27669)

* Bump e to include teleport.e#1634

* Fix error assertions in the test

This test is removed altogether in #27075,
but that has not been backported yet.

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants