-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ML] Fix Index Data Visualizer not gracefully handling error #104567
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
Conversation
peteharverson
left a comment
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.
Tested and LGTM
| // there could be multiple errors | ||
| if (Array.isArray(allStats.errors) && allStats.errors.length > 0) { | ||
| allStats.errors.forEach((err: any) => { | ||
| dataLoader.displayError(err.body?.message?.output?.payload ?? err); |
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.
it might be worth testing this error with our extractErrorProperties function to see if it displays it extracts the error text correctly, if so, I think we should copy that function over to tis plugin.
The shape of errors returned from es and kibana can depend on where they were thrown from, extractErrorProperties does a decent job of recognising all known error shapes.
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.
Added the new utility here 4c2b680
|
Pinging @elastic/ml-ui (:ml) |
|
@elasticmachine merge upstream |
jgowdyelastic
left a comment
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
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
…#104567) * Fix to show better error message * Handle batch errors by still showing as much data as possible * Fix i18n * Fix errors * Fix 404 error, add extractErrorProperties * Fix missing histogram Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…#104567) * Fix to show better error message * Handle batch errors by still showing as much data as possible * Fix i18n * Fix errors * Fix 404 error, add extractErrorProperties * Fix missing histogram Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
#105463) * Fix to show better error message * Handle batch errors by still showing as much data as possible * Fix i18n * Fix errors * Fix 404 error, add extractErrorProperties * Fix missing histogram Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
#105464) * Fix to show better error message * Handle batch errors by still showing as much data as possible * Fix i18n * Fix errors * Fix 404 error, add extractErrorProperties * Fix missing histogram Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
Summary
This PR fixes #102966 . Previously, when an error occurs, the Index Data Visualizer would show an error message that's not too helpful and would fail to load for all other fields.
Before

Note that because
transaction.duration.histogramfails, all other fields in the index will also failAfter

Here, only the fields in the same batch as
transaction.duration.histogramwould not showChecklist
Delete any items that are not applicable to this PR.