Skip to content

[ES|QL] Handles dom exceptions#270603

Merged
stratoula merged 3 commits into
elastic:mainfrom
stratoula:fix-dom-exception-esql
May 22, 2026
Merged

[ES|QL] Handles dom exceptions#270603
stratoula merged 3 commits into
elastic:mainfrom
stratoula:fix-dom-exception-esql

Conversation

@stratoula
Copy link
Copy Markdown
Contributor

@stratoula stratoula commented May 22, 2026

Summary

This is a regression caused by #242346. It changed the error: from the original throwError(() => new AbortError()) to throwError(() => new AbortError((e.target as AbortSignal)?.reason)), intending to preserve the abort reason in the error.

The editor though was not handling this kind of errors correctly causing the following bug:

  • I am in Lens ES|QL
  • I cancel the query
  • I see an error at the footer of my editor
  • I click the error
  • 💥

This PR handles this kind of errors gracefully

image

Checklist

@stratoula stratoula added release_note:fix v9.5.0 v9.4.2 backport:version Backport to applied version labels Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// labels May 22, 2026
@stratoula stratoula marked this pull request as ready for review May 22, 2026 13:05
@stratoula stratoula requested a review from a team as a code owner May 22, 2026 13:05
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/kibana-esql (Team:ESQL)

@stratoula stratoula enabled auto-merge (squash) May 22, 2026 13:10
Copy link
Copy Markdown
Contributor

@bartoval bartoval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only code

@kibanamachine
Copy link
Copy Markdown
Contributor

kibanamachine commented May 22, 2026

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #35 - serverless-observability_complete / default / local-serverless-observability_complete - Hosts Page - Empty State - should show onboarding page when no data is present
  • [job] [logs] Scout Lane #38 - serverless-observability_complete / workflows_ui / local-serverless-observability_complete - Workflow composition - sync: waits for child workflow and completes with correct step count
  • [job] [logs] Scout Lane #9 - stateful-classic / default / local-stateful-classic - Profiling is setup and data is loaded - Admin user
  • [job] [logs] Scout Lane #19 - stateful-classic / uptime_legacy / local-stateful-classic - snapshot count - counts correctly with timespans=true and observer=true

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
esql 920.6KB 920.6KB -1.0B

History

@stratoula stratoula merged commit 55690be into elastic:main May 22, 2026
129 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/26293283483

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.4 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 270603

Questions ?

Please refer to the Backport tool documentation

@stratoula
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jcger pushed a commit that referenced this pull request May 26, 2026
## Summary

This is a regression caused by
#242346. It changed the error:
from the original throwError(() => new AbortError()) to throwError(() =>
new AbortError((e.target as AbortSignal)?.reason)), intending to
preserve the abort reason in the error.

The editor though was not handling this kind of errors correctly causing
the following bug:

- I am in Lens ES|QL
- I cancel the query
- I see an error at the footer of my editor
- I click the error
- 💥 

This PR handles this kind of errors gracefully

<img width="722" height="493" alt="image"
src="https://github.com/user-attachments/assets/374eadfd-93e0-47d8-8e2f-a2e2c1e3caaf"
/>


### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
stratoula added a commit that referenced this pull request May 26, 2026
# Backport

This will backport the following commits from `main` to `9.4`:
- [[ES|QL] Handles dom exceptions
(#270603)](#270603)

<!--- Backport version: 11.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"Stratou","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2026-05-22T14:21:08Z","message":"[ES|QL]
Handles dom exceptions (#270603)\n\n## Summary\n\nThis is a regression
caused by\nhttps://github.com//pull/242346. It changed the
error:\nfrom the original throwError(() => new AbortError()) to
throwError(() =>\nnew AbortError((e.target as AbortSignal)?.reason)),
intending to\npreserve the abort reason in the error.\n\nThe editor
though was not handling this kind of errors correctly causing\nthe
following bug:\n\n- I am in Lens ES|QL\n- I cancel the query\n- I see an
error at the footer of my editor\n- I click the error\n- 💥 \n\nThis PR
handles this kind of errors gracefully\n\n<img width=\"722\"
height=\"493\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/374eadfd-93e0-47d8-8e2f-a2e2c1e3caaf\"\n/>\n\n\n###
Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"55690be1086a3f9316b0a0c150b41eca7de1af6e","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ES|QL","Team:ESQL","backport:version","v9.5.0","v9.4.2"],"title":"[ES|QL]
Handles dom
exceptions","number":270603,"url":"https://github.com/elastic/kibana/pull/270603","mergeCommit":{"message":"[ES|QL]
Handles dom exceptions (#270603)\n\n## Summary\n\nThis is a regression
caused by\nhttps://github.com//pull/242346. It changed the
error:\nfrom the original throwError(() => new AbortError()) to
throwError(() =>\nnew AbortError((e.target as AbortSignal)?.reason)),
intending to\npreserve the abort reason in the error.\n\nThe editor
though was not handling this kind of errors correctly causing\nthe
following bug:\n\n- I am in Lens ES|QL\n- I cancel the query\n- I see an
error at the footer of my editor\n- I click the error\n- 💥 \n\nThis PR
handles this kind of errors gracefully\n\n<img width=\"722\"
height=\"493\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/374eadfd-93e0-47d8-8e2f-a2e2c1e3caaf\"\n/>\n\n\n###
Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"55690be1086a3f9316b0a0c150b41eca7de1af6e"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/270603","number":270603,"mergeCommit":{"message":"[ES|QL]
Handles dom exceptions (#270603)\n\n## Summary\n\nThis is a regression
caused by\nhttps://github.com//pull/242346. It changed the
error:\nfrom the original throwError(() => new AbortError()) to
throwError(() =>\nnew AbortError((e.target as AbortSignal)?.reason)),
intending to\npreserve the abort reason in the error.\n\nThe editor
though was not handling this kind of errors correctly causing\nthe
following bug:\n\n- I am in Lens ES|QL\n- I cancel the query\n- I see an
error at the footer of my editor\n- I click the error\n- 💥 \n\nThis PR
handles this kind of errors gracefully\n\n<img width=\"722\"
height=\"493\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/374eadfd-93e0-47d8-8e2f-a2e2c1e3caaf\"\n/>\n\n\n###
Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"55690be1086a3f9316b0a0c150b41eca7de1af6e"}},{"branch":"9.4","label":"v9.4.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:ES|QL ES|QL related features in Kibana release_note:fix Team:ESQL ES|QL related features in Kibana t// v9.4.2 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants