Skip to content

Commit c893f75

Browse files
committed
Fail when policy creation error
1 parent 810284a commit c893f75

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

x-pack/plugins/security_solution/server/integration_tests/lib/telemetry_helpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ export async function createAgentPolicy(
293293
return await soClient.create<unknown>(LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, {}, { id });
294294
} catch {
295295
logger.error(`>> Error searching for agent: ${e}`);
296+
throw Error(`>> Error searching for agent: ${e}`);
296297
}
297298
});
298299

@@ -306,6 +307,7 @@ export async function createAgentPolicy(
306307
});
307308
} catch (e) {
308309
logger.error(`>> Error creating package policy: ${e}`);
310+
throw Error(`>> Error creating package policy: ${e}`);
309311
}
310312
});
311313
}

0 commit comments

Comments
 (0)