Skip to content

Commit

Permalink
[Security Solution] Gracefully handle errors in detection rules insta…
Browse files Browse the repository at this point in the history
  • Loading branch information
pzl authored and cqliu1 committed Nov 18, 2020
1 parent 0c4200d commit 4624156
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,15 @@ export const createPrepackagedRules = async (
);
}
}
const result = await Promise.all([
installPrepackagedRules(alertsClient, rulesToInstall, signalsIndex),
installPrepackagedTimelines(maxTimelineImportExportSize, frameworkRequest, true),
]);

await Promise.all(installPrepackagedRules(alertsClient, rulesToInstall, signalsIndex));
const timeline = await installPrepackagedTimelines(
maxTimelineImportExportSize,
frameworkRequest,
true
);
const [prepackagedTimelinesResult, timelinesErrors] = validate(
result[1],
timeline,
importTimelineResultSchema
);
await updatePrepackagedRules(alertsClient, savedObjectsClient, rulesToUpdate, signalsIndex);
Expand Down

0 comments on commit 4624156

Please sign in to comment.