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

[24.0] Add GenericItem error handling #18203

Merged

Conversation

ahmedhamidawan
Copy link
Member

GenericItem was missing a onError function. Now, it catches backend errors and displays a Toast message for any failed operation. Fixes #18176

image

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

`GenericItem` was missing a `onError` function. Now, it catches backend errors and displays a `Toast` message for any failed operation.
Fixes galaxyproject#18176
@github-actions github-actions bot added this to the 24.1 milestone May 22, 2024
@ahmedhamidawan ahmedhamidawan removed this from the 24.1 milestone May 22, 2024
@mvdbeek
Copy link
Member

mvdbeek commented May 23, 2024

I think the toast is out of context here, could this be rendered in line ? As a user I couldn't really tell what the problem is in the screenshot. And I think all the delete/update methods in the component also need some error handling ?

@ahmedhamidawan
Copy link
Member Author

I think the toast is out of context here, could this be rendered in line ? As a user I couldn't really tell what the problem is in the screenshot. And I think all the delete/update methods in the component also need some error handling ?

Oh I also added error handling for all the other update methods in GenericItem. I think adding a Title to the Toasts helps (which i did in the latest commit):
generic_item_toasts

Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Thank you @ahmedhamidawan!

@dannon dannon merged commit 2ddea78 into galaxyproject:release_24.0 May 23, 2024
27 checks passed
@ahmedhamidawan ahmedhamidawan deleted the fix_content_item_on_error branch May 23, 2024 18:05
@jdavcs jdavcs added this to the 24.1 milestone May 23, 2024
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.

4 participants