From 3a4d96aba7f27e27e6c04473262158f1bc1590cd Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Wed, 14 Apr 2021 13:51:17 +0200 Subject: [PATCH] added missing optional chain for bracket notation (#96939) (#97089) --- .../rollup/server/routes/api/jobs/register_delete_route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/rollup/server/routes/api/jobs/register_delete_route.ts b/x-pack/plugins/rollup/server/routes/api/jobs/register_delete_route.ts index f90a81f73823e..7e22b5c4ead10 100644 --- a/x-pack/plugins/rollup/server/routes/api/jobs/register_delete_route.ts +++ b/x-pack/plugins/rollup/server/routes/api/jobs/register_delete_route.ts @@ -37,7 +37,7 @@ export const registerDeleteRoute = ({ // Until then we'll modify the response here. if ( err?.meta && - err.body?.task_failures[0]?.reason?.reason?.includes( + err.body?.task_failures?.[0]?.reason?.reason?.includes( 'Job must be [STOPPED] before deletion' ) ) {