-
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
[Search] Error notification alignment #77788
Conversation
Add original error to expression exception
Pinging @elastic/kibana-app-arch (Team:AppArch) |
@kibana-design changes are only deletion of a react component and it's css |
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.
Kibana App owned code LGTM 👍. like I mentioned, I will create an issue to improve the error message in Discover once this is merged.
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.
I tested basic "failed to fetch" error scenario in different apps by blocking requests. Seems good.
Didn't cover "upgrade to basic" scenario. (Didn't want to block, I need to dig into using those responses you've shared)
Thanks for addressing feedback suggestions.
Regarding react components as part of errors, I share @lukeelmers's point on it: #77788 (comment)
@lukeelmers @Dosant @lukasolson I agree that having the notification code in the interceptor is not ideal and we can revisit this when unifying the search service and search interceptor code. |
There's a bit of repetition in the "Timed out" message. How about combining the title and the first sentence: Title: Your query has timed out |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
SIEM/Endpoint changes LGTM
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
* OSS error alignemnt * Adjust error messages in xpack * Add getErrorMessage * Use showError in vizualize Add original error to expression exception * Cleanup * ts, doc and i18n fixes * Fix jest tests * Fix functional test * functional test * ts * Update functional tests * Add unit tests to interceptor and timeout error * expose toasts test function * doc * typos * review 1 * Code review * doc * doc fix * visualization type fix * fix jest * Fix xpack functional test * fix xpack test * code review * delete debubg flag * Update texts by @gchaps * docs and ts Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: Fix APM lodash imports (elastic#78438) Add deprecated message to tile_map and region_map visualizations. (elastic#77683) Fix Lens smokescreen flaky tests (elastic#78566) updated discover with alt text (elastic#77660) Fix types (elastic#78619) Update tutorial-visualizing.asciidoc (elastic#76977) Update tutorial-discovering.asciidoc (elastic#76976) [Search] Error notification alignment (elastic#77788) Update tutorial-define-index.asciidoc (elastic#76975) [Lens] Fieldless operations (elastic#78080) [Usage Collection] [schema] Explicit "array" definition (elastic#78141) Update tutorial-define-index.asciidoc (elastic#76973) Fix --no-basepath references in doc (elastic#78570) Move StubIndexPattern to data plugin and convert to TS. (elastic#78518) Index pattern class - remove unused methods (elastic#78538) [Security Solution] [ALL] Eliminates all console.error and console.warn from Jest output (elastic#78523) [Actions] avoids setting a default dedupKey on PagerDuty (elastic#77773) First stab at developer-focussed saved objects docs (elastic#71430) remove unnecessary config validations (elastic#78527)
* OSS error alignemnt * Adjust error messages in xpack * Add getErrorMessage * Use showError in vizualize Add original error to expression exception * Cleanup * ts, doc and i18n fixes * Fix jest tests * Fix functional test * functional test * ts * Update functional tests * Add unit tests to interceptor and timeout error * expose toasts test function * doc * typos * review 1 * Code review * doc * doc fix * visualization type fix * fix jest * Fix xpack functional test * fix xpack test * code review * delete debubg flag * Update texts by @gchaps * docs and ts Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
I've attached response files that can be used to mock each error type
This PR introduces explicit error types into the search service. The search service can now throw the following error types:
AbortError
if the request was canceled by the application or by callingcancelPending
SearchTimeoutError
if the request has timed out on the client or on the server.PainlessError
if there's an painless script error inside the responseIt also introduces a
showError
function which handles showing toast messages for the errors thrown. This allows most applications to so something like this, without having to implement logic per specific error type (Dashboard for example doesn't use the default error handling and shows labels on individual panels instead).This logic is applied to discover, visualize and dashboard. In discover, it allowed deleting the old code handling of a
PainlessError
.This PR also fixes #77579 by fixing how timeout subscriptions are removed.
How it looks
In Discover and Visualize
In dashboard
Most errors are shown inside individual panels, but timeout errors still show as a notification (once per session).
Dev Docs
This PR introduces explicit error types to the
data.search
service:AbortError
if the request was canceled by the application or by callingcancelPending
SearchTimeoutError
if the request has timed out on the client or on the server.PainlessError
if there's an painless script error inside the responseThe new
showError
function can be used with these errors, to show customized toast messages. Applications may choose to handle errors differently, however theSearchTimeoutError
error notification will be shown regardless.Checklist
Delete any items that are not applicable to this PR.
For maintainers