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(client): handle errors from the getSessions query in the Dashboard #2903

Merged
merged 9 commits into from
Nov 20, 2023

Conversation

leafty
Copy link
Member

@leafty leafty commented Nov 17, 2023

Fixes #2873.

Introduces a new context and component to handle RTK Query errors in the case when nested components use an errored query.

/deploy

@leafty leafty marked this pull request as ready for review November 17, 2023 08:46
@leafty leafty requested a review from a team as a code owner November 17, 2023 08:46
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-2903.dev.renku.ch

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Nice solution and the code looks good 👍

Should we show a banner on the Dashboard mentioning there is a problem with sessions when we get errors? Otherwise, users do not know that's the case and all looks fine
image

@leafty leafty temporarily deployed to renku-ci-ui-2903 November 17, 2023 12:28 — with GitHub Actions Inactive
@leafty
Copy link
Member Author

leafty commented Nov 17, 2023

Should we show a banner on the Dashboard mentioning there is a problem with sessions when we get errors? Otherwise, users do not know that's the case and all looks fine

I add 3befaf0, but I am not sure if users will understand the error message.

@lorenzo-cavazzi
Copy link
Member

Oh, I meant something more generic, like a Warning saying "Sessions are currently unavailable"

@leafty
Copy link
Member Author

leafty commented Nov 20, 2023

Oh, I meant something more generic, like a Warning saying "Sessions are currently unavailable"

Done in 65d40d3.

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Very nice solution!

I noticed the function extractRkErrorMessage isn't working as expected. I'm unsure whether the Notebooks error is different from the Core error, or if something else is wrong in the logic there.
It would be great if you had some spare time to look at it. Otherwise, feel free to remove the specific error message and we can make a follow-up issue to fix the "RkErrorMessage" component(s) -- it would be great to have one that "just works", or to clearly distinguish between "renku-core" and "renku-notebooks" errors.

image

@leafty
Copy link
Member Author

leafty commented Nov 20, 2023

Very nice solution!

I noticed the function extractRkErrorMessage isn't working as expected. I'm unsure whether the Notebooks error is different from the Core error, or if something else is wrong in the logic there. It would be great if you had some spare time to look at it. Otherwise, feel free to remove the specific error message and we can make a follow-up issue to fix the "RkErrorMessage" component(s) -- it would be great to have one that "just works", or to clearly distinguish between "renku-core" and "renku-notebooks" errors.

I think it's not as simple because if I remove the notebooks service I get a proper error:
image

@lorenzo-cavazzi
Copy link
Member

Some errors are handled, but others aren't (E.G. the renku-notebooks standard)

@leafty leafty merged commit aa826b4 into master Nov 20, 2023
17 checks passed
@leafty leafty deleted the leafty/2873-handle-data-services-errors branch November 20, 2023 15:26
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

@leafty leafty mentioned this pull request Nov 24, 2023
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.

Handle errors from the servers endpoint in the Dashboard
4 participants