Account for error.reason === null#228058
Merged
gsoldevila merged 4 commits intoelastic:mainfrom Jul 18, 2025
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-core (Team:Core) |
afharo
approved these changes
Jul 15, 2025
Comment on lines
+41
to
+43
| const { reason: esErrorReason } = get(error, 'body.error', { reason: undefined }) as { | ||
| reason?: string | null; | ||
| }; |
Member
There was a problem hiding this comment.
nit: this could have been caught in the past if we used a type provided by the ES client.
Maybe ErrorCause instead of the explicit casting to { reason?: string | null }?
Contributor
|
Starting backport for target branches: 9.1 https://github.com/elastic/kibana/actions/runs/16373654244 |
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jul 18, 2025
## Summary Starting on elasticsearch-js `9.0.3`, the `error.reason` field can now be also `null`. This PR updates our decorator to account for that case as well. Related to elastic#226188 (cherry picked from commit b1132c1)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Jul 18, 2025
# Backport This will backport the following commits from `main` to `9.1`: - [Account for error.reason === null (#228058)](#228058) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-07-18T14:55:29Z","message":"Account for error.reason === null (#228058)\n\n## Summary\n\nStarting on elasticsearch-js `9.0.3`, the `error.reason` field can now\nbe also `null`.\nThis PR updates our decorator to account for that case as well. \n\nRelated to https://github.com/elastic/kibana/pull/226188","sha":"b1132c1f0c2702589a8c6c796062d920ae242c02","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","backport:version","v9.1.0","v9.2.0"],"title":"Account for error.reason === null","number":228058,"url":"https://github.com/elastic/kibana/pull/228058","mergeCommit":{"message":"Account for error.reason === null (#228058)\n\n## Summary\n\nStarting on elasticsearch-js `9.0.3`, the `error.reason` field can now\nbe also `null`.\nThis PR updates our decorator to account for that case as well. \n\nRelated to https://github.com/elastic/kibana/pull/226188","sha":"b1132c1f0c2702589a8c6c796062d920ae242c02"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228058","number":228058,"mergeCommit":{"message":"Account for error.reason === null (#228058)\n\n## Summary\n\nStarting on elasticsearch-js `9.0.3`, the `error.reason` field can now\nbe also `null`.\nThis PR updates our decorator to account for that case as well. \n\nRelated to https://github.com/elastic/kibana/pull/226188","sha":"b1132c1f0c2702589a8c6c796062d920ae242c02"}}]}] BACKPORT--> Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
Bluefinger
pushed a commit
to Bluefinger/kibana
that referenced
this pull request
Jul 22, 2025
## Summary Starting on elasticsearch-js `9.0.3`, the `error.reason` field can now be also `null`. This PR updates our decorator to account for that case as well. Related to elastic#226188
kertal
pushed a commit
to kertal/kibana
that referenced
this pull request
Jul 25, 2025
## Summary Starting on elasticsearch-js `9.0.3`, the `error.reason` field can now be also `null`. This PR updates our decorator to account for that case as well. Related to elastic#226188
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Starting on elasticsearch-js
9.0.3, theerror.reasonfield can now be alsonull.This PR updates our decorator to account for that case as well.
Related to #226188