You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens with many different failure cases - e.g. trying to Visualize with an aggregation on a non-aggregatable field.
The error message shown in Dashboards is often an abstruse and very Java-specific error from the error.caused_by.reason field of the REST response, with a stack trace from Dashboards code which isn't useful. For example:
Cannot invoke \"org.opensearch.search.aggregations.InternalAggregations.getSerializedSize()\" because \"reducePhase.aggregations\" is null
Error
at fetch_Fetch.fetchResponse (https://opensearch.example.com/_dashboards/410202401/bundles/core/core.entry.js:15:241661)
at async interceptResponse (https://opensearch.example.com/_dashboards/410202401/bundles/core/core.entry.js:15:236415)
at async https://opensearch.example.com/_dashboards/410202401/bundles/core/core.entry.js:15:239382
The actual (useful to the user) error in this case is in the message or error.root_cause.[0].reason field:
"Text fields are not optimised for operations that require per-document field data like aggregations
and sorting, so these operations are disabled by default. Please use a keyword field instead.
Alternatively, set fielddata=true on [client_ip] in order to load field data by uninverting
the inverted index. Note that this can use significant memory."
To Reproduce
Create a mapping template with a single text field
Index a few documents with a timestamp and this text field populated
Create an index template and confirm documents exist with the field
Use "Visualize" to create a date histogram with Y-axis buckets for a terms aggregation on the text field
Expected behavior
An error message should be shown indicating that the field cannot be used in the manner attempted.
Host/Environment (please complete the following information):
OS: AWS managed service, presumed a Linux variant
Browser and version: Chrome 129.0 here, but probably any
Additional context
It's not clear to me whether there are some cases where the useful message is in message as above, and others where the situation is reversed and caused_by is the useful one. A solution may involve the error dialog including one of them with a "More detail" showing the other to cover both bases.
The text was updated successfully, but these errors were encountered:
Describe the bug
This happens with many different failure cases - e.g. trying to Visualize with an aggregation on a non-aggregatable field.
The error message shown in Dashboards is often an abstruse and very Java-specific error from the
error.caused_by.reason
field of the REST response, with a stack trace from Dashboards code which isn't useful. For example:The actual (useful to the user) error in this case is in the
message
orerror.root_cause.[0].reason
field:To Reproduce
Expected behavior
An error message should be shown indicating that the field cannot be used in the manner attempted.
OpenSearch Version
2.13.0 (in AWS)
Dashboards Version
Presume same as opensearch, not surfaced.
Plugins
Screenshots
Host/Environment (please complete the following information):
Additional context
It's not clear to me whether there are some cases where the useful message is in
message
as above, and others where the situation is reversed andcaused_by
is the useful one. A solution may involve the error dialog including one of them with a "More detail" showing the other to cover both bases.The text was updated successfully, but these errors were encountered: