Skip to content

Commit

Permalink
[Index Management] Fix empty error toast message from extension actio…
Browse files Browse the repository at this point in the history
…ns (elastic#173620)

Fixes elastic#118464

Similar to elastic#162656

## Summary

This PR fixes the empty error toast that appears from a failed extension
action.

For example, when the ILM extension action "Retry lifecycle step" fails,
it would display an empty error toast on cloud (or it would display "Bad
request" when running locally):


https://github.com/elastic/kibana/assets/59341489/37c3113a-4f2b-4157-ab0c-658c410349c8

With these changes, the error toast also displays the message:



https://github.com/elastic/kibana/assets/59341489/1f6df5c4-381f-4039-b5f3-746c5783bd2c




**How to test:**

For testing a failing "Retry lifecycle step" action, I followed the
instructions in this
[README](https://github.com/elastic/kibana/blob/main/x-pack/plugins/index_lifecycle_management/README.md)
file to create a lifecycle policy error.
The changes in this PR can be tested in its [CI Cloud
deployment](https://kibana-pr-173620.kb.us-west2.gcp.elastic-cloud.com:9243/).
  • Loading branch information
ElenaStoeva authored Dec 20, 2023
1 parent 9522d74 commit f0af2b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const performExtensionAction =
try {
await requestMethod(indexNames, httpService.httpClient);
} catch (error) {
notificationService.showDangerToast(error.message);
notificationService.showDangerToast(error.body.message);
return;
}
dispatch(reloadIndices(indexNames));
Expand Down

0 comments on commit f0af2b9

Please sign in to comment.