Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
|
It's better to use a title that describes the error. Elasticsearch errors Title: Cannot retrieve search results Description: A description is not needed as the title gives the reason Http errors Title: Cannot retrieve your data Description: Check your network and proxy configuration. If the problem persists, contact your network administrator. I'm assuming that the text in the blue box comes directly from ES or the HTTP response and can't be edited. Let me know otherwise. |
|
@elasticmachine merge upstream |
…into search/error-alignment-2
lukasolson
left a comment
There was a problem hiding this comment.
LGTM, added a couple of very minor things below.
| if (!isEsError(err)) return false; | ||
|
|
||
| const rootCause = getRootCause(err as EsError); | ||
| const rootCause = getRootCause(err as IEsError); |
There was a problem hiding this comment.
Is the cast here necessary (since you've checked isEsError above, which is implemented as a type check)?
| export function getFailedShards(err: IEsError) { | ||
| const failedShards = | ||
| err.body?.attributes?.error?.failed_shards || | ||
| err.body?.attributes?.error?.caused_by?.failed_shards; |
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
* Improve the display of ES errors and Http errors * fixes * Improve text * fix ts * update limit Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # packages/kbn-optimizer/limits.yml
…arm-phase-to-formlib * 'master' of github.com:elastic/kibana: [Trigger Actions UI] Properly unmount app (elastic#81436) skip flaky suite (elastic#81576) skip flaky suite (elastic#78373) [Security Solution] Fix styling of EditDataProvider content (elastic#81456) [Search] Error Alignment 2 (elastic#80965) [APM] Unskip test (elastic#81574) [ML] Fix partition value selection on the Single Metric Viewer (elastic#81585) cleaning up expression service types (elastic#80643) Fix suggestions dropdown for query input (elastic#80990) [Usage collection] Make `schema` mandatory (elastic#79999) [ILM] Update show/hide data tier logic on cloud (elastic#81455) added brace import to advanced settings (elastic#81458) chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies
Summary
Improve the display of ES errors and HTTP errors
Elasticsearch errors
This PR adds explicit handling for all internal
Elasticsearcherrors, including the one mentioned on this issue. The new error message exposes thereasonreturned, rather than showing the same stack trace every time.HTTP errors
Network or response parsing errors result in a very non descriptive errors, making SDH resolution more difficult.
This PR adds a more descriptive error for cases where
core.http.fetchfails for various reasons.Checklist
Delete any items that are not applicable to this PR.
For maintainers