Skip to content
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

[Discover] Error handling when failed to build a search request #103083

Closed
Dosant opened this issue Jun 23, 2021 · 1 comment · Fixed by #103923
Closed

[Discover] Error handling when failed to build a search request #103083

Dosant opened this issue Jun 23, 2021 · 1 comment · Fixed by #103923
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@Dosant
Copy link
Contributor

Dosant commented Jun 23, 2021

Kibana version: 7.14 / master
Description of the problem including expected versus actual behavior:

Building a search request could fail for multiple reasons, mostly due to unsupported configuration.
For example #103082, the failure happens at:

searchSource.setField('aggs', chartAggConfigs.toDsl());

kbn-ui-shared-deps.js:298 Uncaught Error: Saved field "variants.updated" of index pattern "hc-products" is invalid for use with the "Date Histogram" aggregation. Please select a new field.
    at FieldParamType.write (field.ts:77)
    at agg_params.ts:48
    at Array.forEach (<anonymous>)
    at writeParams (agg_params.ts:46)
    at AggConfig.write (agg_config.ts:168)
    at AggConfig.toDsl (agg_config.ts:225)
    at agg_configs.ts:222
    at Array.forEach (<anonymous>)
    at AggConfigs.toDsl (agg_configs.ts:201)
    at use_saved_search.ts:126

In this example, Discover doesn't show the user an error. Even no toast.
It just continues to look like it is running a search:

Screen Shot 2021-06-23 at 14 41 33

** Expected behaviour **:

Exit loading state and show error an error state

@Dosant Dosant added bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application labels Jun 23, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 23, 2021
@Dosant Dosant added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jun 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
3 participants