-
Notifications
You must be signed in to change notification settings - Fork 885
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
[Data Explorer] Fix missing field error from taking down the page #5626
[Data Explorer] Fix missing field error from taking down the page #5626
Conversation
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5626 +/- ##
==========================================
- Coverage 67.02% 66.97% -0.05%
==========================================
Files 3294 3294
Lines 63296 63298 +2
Branches 10066 10067 +1
==========================================
- Hits 42422 42395 -27
- Misses 18434 18437 +3
- Partials 2440 2466 +26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
try { | ||
return data.search.aggs.createAggConfigs(indexPattern, visStateAggs); | ||
} catch (error) { | ||
// Just display the error to the user but continue to render the rest of the page | ||
data.search.showError(error as Error); | ||
return; | ||
} |
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.
A test to cover this section is preferred.
) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) (#5747) * Handle missing fields error --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) (#5748) * Handle missing fields error Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * adds changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * ndo unnecessary changes to changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cleanup changelog Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Fix PR number Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> (cherry picked from commit 28c1fbb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
If an index pattern is created programatically using saved object API but a corresponding index does not exist for the pattern, discover throws a full page error that blocks the app from being used. This change still displays the error but allows the user to continue using the app to make other changes and remedy the situation.
Issues Resolved
closes #5625
Screenshot
Before:
After:
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration