mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
(cherry picked from commit 2b8b331271
)
# Conflicts:
# x-pack/plugins/fleet/server/services/package_policy.ts
This commit is contained in:
parent
633934ed32
commit
827e50d184
1 changed files with 6 additions and 2 deletions
|
@ -112,7 +112,9 @@ class PackagePolicyService {
|
|||
|
||||
// Check that the name does not exist already
|
||||
if (existingPoliciesWithName.items.length > 0) {
|
||||
throw new IngestManagerError('There is already an integration policy with the same name');
|
||||
throw new IngestManagerError(
|
||||
`An integration policy with the name ${packagePolicy.name} already exists. Please rename it or choose a different name.`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -379,7 +381,9 @@ class PackagePolicyService {
|
|||
const filtered = (existingPoliciesWithName?.items || []).filter((p) => p.id !== id);
|
||||
|
||||
if (filtered.length > 0) {
|
||||
throw new IngestManagerError('There is already an integration policy with the same name');
|
||||
throw new IngestManagerError(
|
||||
`An integration policy with the name ${packagePolicy.name} already exists. Please rename it or choose a different name.`
|
||||
);
|
||||
}
|
||||
|
||||
let inputs = restOfPackagePolicy.inputs.map((input) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue