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
Bug 1877198: Query Browser: Improve error message when Prometheus API returns 403 #6561
Bug 1877198: Query Browser: Improve error message when Prometheus API returns 403 #6561
Conversation
Add `PrometheusAPIError` type to improve type checking. Add `err.name !== 'AbortError'` check to avoid the possibility of trying to update state after the component has unmounted.
/retest |
@kyoto: This pull request references Bugzilla bug 1877198, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Generally, the navigation links to this page should not be visible if the user cannot access the Prometheus API. However, it is still possible to access the page (e.g. if you have bookmarked it). Also, I think it's better to handle this case with a more specific error message, to aid troubleshooting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kyoto, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kyoto: All pull requests linked via external trackers have merged: Bugzilla bug 1877198 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Add
PrometheusAPIError
type to improve type checking.Add
err.name !== 'AbortError'
check to avoid the possibility of tryingto update state after the component has unmounted.