Skip to content

Commit

Permalink
Fixed registry error message
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Nov 12, 2020
1 parent 53ac140 commit b4dc1f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/alerts/server/alert_type_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b4dc1f5

Please sign in to comment.