Skip to content

[7.x] Don't mutate error message (#58452)#58477

Merged
streamich merged 1 commit intoelastic:7.xfrom
streamich:backport/7.x/pr-58452
Feb 25, 2020
Merged

[7.x] Don't mutate error message (#58452)#58477
streamich merged 1 commit intoelastic:7.xfrom
streamich:backport/7.x/pr-58452

Conversation

@streamich
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

* fix: 🐛 don't mutate error object in-place

This avoids mutating error thrown by an expression function in-place.
The error might not even be an object, in which case mutating it will
throw.

* test: 💍 capture in test that thrown error is not mutated

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@streamich streamich added the backport This PR is a backport of another PR label Feb 25, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@streamich streamich merged commit 6b8ae7d into elastic:7.x Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants