Skip to content

show error details when fetching children fails (#28) #654

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

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

adietish
Copy link
Collaborator

fixes #28

@adietish adietish self-assigned this Aug 21, 2023
@adietish adietish changed the title show error details when fetching children fails (#20) show error details when fetching children fails (#28) Aug 21, 2023
@adietish
Copy link
Collaborator Author

adietish commented Aug 21, 2023

With this PR the cause is displayed instead of a generic failure text which tells you that the resources could not have been retrieved.

OpenShift, token expired:

OpenShift, fetching resources forbidden (no premissions):
image

Minikube, connection timed out:
image

@adietish
Copy link
Collaborator Author

adietish commented Aug 21, 2023

To test this one needs a Red Hat Developer Sandbox with an expired token (ex. create the cluster, try to use it after 24h) and a minikube that's defined in kube config but is not running (ex. start minikube, copy kube config, stop minikube, overwrite kube config with the copy). Then:

  1. EXEC: on Red Hat Sandbox: expand "Projects" node in resource tree
    -> child node displays error telling you that the token is expired (see screenshot above)
  2. EXEC: on Red Hat Sandbox: re-authenticate so that you have a valid token.
    Then expand "Namespaces" node in resource tree
    -> child node displays error telling you that the request is forbidden (see screenshot above)
  3. EXEC. on minikube: list any category
    -> child node displays an error telling you that the request timed out

@adietish adietish requested a review from sbouchet August 21, 2023 11:56
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@sbouchet sbouchet left a comment

Choose a reason for hiding this comment

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

LGTM. getting real cause messages in tree as expected by this PR

@adietish adietish merged commit 4bbee58 into redhat-developer:main Aug 23, 2023
@adietish adietish deleted the issue-28 branch August 23, 2023 16:36
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.

Error nodes: improve text to include the reason for the failure
2 participants