From b4dc1f5b2a75a80cd625703da505df82be3fb3de Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Thu, 12 Nov 2020 15:42:59 -0800 Subject: [PATCH] Fixed registry error message --- x-pack/plugins/alerts/server/alert_type_registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/alerts/server/alert_type_registry.ts b/x-pack/plugins/alerts/server/alert_type_registry.ts index 2898c827755f7..8fe2ab06acd9a 100644 --- a/x-pack/plugins/alerts/server/alert_type_registry.ts +++ b/x-pack/plugins/alerts/server/alert_type_registry.ts @@ -150,10 +150,10 @@ function validateActionGroups(alertTypeId: string, actionGroups: ActionGroup[]) getBuiltinActionGroups().map((item) => item.id) ); if (reservedActionGroups.length > 0) { - throw Boom.badRequest( + throw new Error( i18n.translate('xpack.alerts.alertTypeRegistry.register.reservedActionGroupUsageError', { defaultMessage: - 'Alert type by id {alertTypeId} cannot be registered. Action groups [{actionGroups}] is reserved by framework.', + 'Alert type [id="{alertTypeId}"] cannot be registered. Action groups [{actionGroups}] are reserved by the framework.', values: { actionGroups: reservedActionGroups.join(', '), alertTypeId,