Repository navigation
fix(slo): preview data no response error - #167909
Merged
Merged
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
kdelemme
marked this pull request as ready for review
October 3, 2023 16:06
Contributor
|
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @kdelemme |
maryam-saeidi
approved these changes
Oct 4, 2023
| assertNever(type); | ||
| } | ||
| } catch (err) { | ||
| return []; |
Member
There was a problem hiding this comment.
nit: Showing a toast with the error message would help to understand no data is due to an error.
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 5, 2023
(cherry picked from commit 59257db)
kibanamachine
added a commit
that referenced
this pull request
Oct 5, 2023
# Backport This will backport the following commits from `main` to `8.11`: - [fix(slo): preview data no response error (#167909)](#167909) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2023-10-05T13:20:09Z","message":"fix(slo): preview data no response error (#167909)","sha":"59257dbcc8fcf2f05b9ac62cb4a494213afa75cd","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: Actionable Observability","backport:prev-minor","Feature:SLO","v8.12.0"],"number":167909,"url":"https://github.com/elastic/kibana/pull/167909","mergeCommit":{"message":"fix(slo): preview data no response error (#167909)","sha":"59257dbcc8fcf2f05b9ac62cb4a494213afa75cd"}},"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/167909","number":167909,"mergeCommit":{"message":"fix(slo): preview data no response error (#167909)","sha":"59257dbcc8fcf2f05b9ac62cb4a494213afa75cd"}}]}] BACKPORT--> Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
kdelemme
added a commit
to kdelemme/kibana
that referenced
this pull request
Oct 6, 2023
dej611
pushed a commit
to dej611/kibana
that referenced
this pull request
Oct 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #167854
🍒 Summary
When the preview API was failing and returning a no data body, the react hook was interpreting the response as an empty string, resulting in a breaking page.
This PR addresses this issue by always returning an empty response in case of runtime error from the API, and also check the response is an Array from the hook, before returning it to the component.