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(ui): correct the restore modal error message functionalities #11060

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

felismargarita
Copy link
Contributor

What?

If an error comes out in the API during the restoring version, the UI modal will get into an abnormal status.

  1. Restoring button can't go back to the Restore button
  2. Restore Confirm modal can't be closed
  3. Toaster error message is not displayed

Why?

An error happened in the API side should not be an edge case, eg a user throw an error in the hook or network issue, in this situation, the UI should handle the error scenario properly to exit from the processing status and rollback the UI status to be the original one and display a common error message to end users.

How?

Once the API status is not OK

  1. reset the processing status
  2. Activate the cancel button again
  3. Display the toast message. (Actually, a common error toaster already exists for a long time, but it doesn't work because no toaster container exists)

Fixes #11059

@felismargarita felismargarita force-pushed the fix/toaster-message-missing branch from 6225eea to d82e2cd Compare February 8, 2025 15:24
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.

Restore version modal toaster doesn't work
1 participant