Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Jul 6, 2020
1 parent c54ce78 commit d99cf6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions x-pack/plugins/actions/server/builtin_action_types/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ function validateActionTypeConfig(
url = new URL(configObject.url);
} catch (err) {
return i18n.translate('xpack.actions.builtin.webhook.webhookConfigurationErrorNoHostname', {
defaultMessage: `error configuring webhook action: unable to parse url: ${err}`,
defaultMessage: 'error configuring webhook action: unable to parse url: {err}',
values: {
err,
},
});
}

try {
configurationUtilities.ensureWhitelistedUri(url.hostname);
configurationUtilities.ensureWhitelistedUri(url);
} catch (whitelistError) {
return i18n.translate('xpack.actions.builtin.webhook.webhookConfigurationError', {
defaultMessage: 'error configuring webhook action: {message}',
Expand Down

0 comments on commit d99cf6b

Please sign in to comment.