From cf2fc96c19c9d0073173c059bc7ed2d7fa5c49cc Mon Sep 17 00:00:00 2001 From: Jan Monschke Date: Tue, 12 Mar 2024 16:44:32 +0100 Subject: [PATCH] make sure body messages are surfaced --- .../public/timelines/store/middlewares/timeline_note.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/timelines/store/middlewares/timeline_note.ts b/x-pack/plugins/security_solution/public/timelines/store/middlewares/timeline_note.ts index 5d77a5082b82c..81f8b22d89822 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/middlewares/timeline_note.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/middlewares/timeline_note.ts @@ -82,7 +82,7 @@ export const addNoteToTimelineMiddleware: (kibana: CoreStart) => Middleware<{}, } catch (error) { kibana.notifications.toasts.addDanger({ title: i18n.UPDATE_TIMELINE_ERROR_TITLE, - text: error?.message ?? i18n.UPDATE_TIMELINE_ERROR_TEXT, + text: error?.body?.message ?? error?.message ?? i18n.UPDATE_TIMELINE_ERROR_TEXT, }); } finally { store.dispatch(