Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Reverting use of isPopulatedObject in error utils (elastic#159913)
PR elastic#155372 moved our error utils to a package and also made a few small code changes, one of which added `isPopulatedObject` to the error object type guards. `isPopulatedObject` uses `Object.keys` under the hood which cannot be used to access the non-enumerable properties of an object, like Error's `message`. ![image](https://github.com/elastic/kibana/assets/22172091/6a0269df-ca2a-494a-9364-8f35f2b52388) This PR reverts all of these functions back to their original versions which had existed in ML for a while without issue. This was change had been causing error messages to not display correctly. ![image](https://github.com/elastic/kibana/assets/22172091/1862f069-1626-4ac3-8961-dca016b91956) vs ![image](https://github.com/elastic/kibana/assets/22172091/243143a5-0c8f-4365-a41d-7c1c09858ad8)
- Loading branch information