diff --git a/x-pack/plugins/actions/server/lib/action_executor.test.ts b/x-pack/plugins/actions/server/lib/action_executor.test.ts index 549e721ffcdd4..4175649454f71 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.test.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.test.ts @@ -279,9 +279,6 @@ test('throws an error when connector is invalid', async () => { name: 'Test', minimumLicenseRequired: 'basic', validate: { - config: schema.object({ - param1: schema.string(), - }), connector: () => { return 'error'; }, @@ -311,7 +308,7 @@ test('throws an error when connector is invalid', async () => { actionId: '1', status: 'error', retry: false, - message: `error validating action type config: [param1]: expected value of type [string] but got [undefined]`, + message: `error validating action type connector: error`, }); }); diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts index 5da4d4c4e6c55..518d4582de2bc 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.ts @@ -149,12 +149,12 @@ export class ActionExecutor { let validatedSecrets: Record; try { validatedParams = validateParams(actionType, params); - validatedConfig = validateConfig(actionType, config as Record); - validatedSecrets = validateSecrets(actionType, secrets as Record); + validatedConfig = validateConfig(actionType, config); + validatedSecrets = validateSecrets(actionType, secrets); if (actionType.validate?.connector) { validateConnector(actionType, { - config: config as Record, - secrets: secrets as Record, + config, + secrets, }); } } catch (err) {