[Search] Add response status helpers#78006
Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
|
@elasticmachine merge upstream |
lukasolson
left a comment
There was a problem hiding this comment.
Changes LGTM... I'm surprised at how many places this code is already duplicated, so these utilities are definitely helpful. Left a couple of comments below but nothing that should prevent this PR from moving forward.
| text: mountReactNode(message), | ||
| }); | ||
| searchSubscription$.unsubscribe(); | ||
| } else if (response.isPartial && !response.isRunning) { |
There was a problem hiding this comment.
Do we know this is an actual documented error case? Is there a reliable way to reproduce this error?
There was a problem hiding this comment.
I pinged the security team, for them to consider reducing code duplication.
And this is definitely a documented error case (this is what delayed the release of 7.8 or 7.7 I remember)
| // If the response indicates of an error, stop polling and complete the observable | ||
| if (!response || (!response.isRunning && response.isPartial)) { | ||
| if (isErrorResponse(response)) { | ||
| return throwError(new AbortError()); |
There was a problem hiding this comment.
We need to revisit the error we throw here. I think we need to forward the error returned by ES.
There was a problem hiding this comment.
Yep, this is handled in the error alignment PR
https://github.com/elastic/kibana/pull/77788/files#diff-75f11add5ff5d57a12822fe0c5a52536R91
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
distributable file count
History
To update your PR or re-run it, just comment with: |
patrykkopycinski
left a comment
There was a problem hiding this comment.
LGTM Thank you @lizozom 💪
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (31 commits) skip tests for old pacakge (elastic#78194) [Ingest Pipelines] Add url generator for ingest pipelines app (elastic#77872) [Lens] Rename "telemetry" to "stats" (elastic#78125) [CSM] Url search (elastic#77516) [Drilldowns] Config to disable URL Drilldown (elastic#77887) [Lens] Combined histogram/range aggregation for numbers (elastic#76121) Remove legacy plugins support (elastic#77599) 'Auto' interval must be correctly calculated for natural numbers (elastic#77995) [CSM] fix ingest data retry order messed up (elastic#78163) Add response status helpers (elastic#78006) Bump react-beautiful-dnd (elastic#78028) [Security Solution][Detection Engine] Bubbles up more error messages from ES queries to the UI (elastic#78004) Index pattern - refactor constructor (elastic#77791) Add `xpack.security.sameSiteCookies` to docker allow list (elastic#78192) Remove [key: string]: any; from IIndexPattern (elastic#77968) Remove requirement for manage_index_templates privilege for Index Management (elastic#77377) [Ingest Manager] Agent bulk actions UI (elastic#77690) [Metrics UI] Add inventory view timeline (elastic#77804) Reporting/Docs: Updates for setting to enable CSV Download (elastic#78101) Update to latest rum-react (elastic#78193) ...
Summary
Dev Docs
Introduces the following
searchhelpersisCompleteResponseisErrorResponseisPartialResponseChecklist
Delete any items that are not applicable to this PR.
For maintainers