-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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(slo): handle permission error #167933
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @kdelemme |
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
While reviewing this I found another bug that I documented in this issue: #168051
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 335fc9b)
# Backport This will backport the following commits from `main` to `8.11`: - [fix(slo): handle permission error (#167933)](#167933) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-05T13:17:32Z","message":"fix(slo): handle permission error (#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team: Actionable Observability","Feature:SLO","v8.12.0"],"number":167933,"url":"https://github.com/elastic/kibana/pull/167933","mergeCommit":{"message":"fix(slo): handle permission error (#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167933","number":167933,"mergeCommit":{"message":"fix(slo): handle permission error (#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b"}},{"url":"https://github.com/elastic/kibana/pull/168231","number":168231,"branch":"8.10","state":"OPEN"}]}] BACKPORT-->
Resolves #167924
🍒 Summary
This PR catches any security_exception error thrown by the transform install API, and return a 403 with the root cause message.
The react query hooks have been updated to handle any server error, and particularly show the
error.body.message
if any, or fallback to theerror.message
which is the related status message, e.g. Forbidden, Bad Request, ...