diff --git a/packages/frontend-plugin-api/src/wiring/createExtension.test.ts b/packages/frontend-plugin-api/src/wiring/createExtension.test.ts index 9d2aff5d99..d6e2599138 100644 --- a/packages/frontend-plugin-api/src/wiring/createExtension.test.ts +++ b/packages/frontend-plugin-api/src/wiring/createExtension.test.ts @@ -969,7 +969,7 @@ describe('createExtension', () => { .add(multi2Ext) .data(outputRef), ).toThrowErrorMatchingInlineSnapshot( - `"Failed to instantiate extension 'subject', Invalid override provided for input 'multi', when overriding the input data the length must match the original input data"`, + `"Failed to instantiate extension 'subject', override data provided for input 'multi' must match the length of the original inputs"`, ); // Required input not provided @@ -992,7 +992,7 @@ describe('createExtension', () => { .add(multi2Ext) .data(outputRef), ).toThrowErrorMatchingInlineSnapshot( - `"Failed to instantiate extension 'subject', Missing required data values for 'test1'"`, + `"Failed to instantiate extension 'subject', missing required extension data value(s) 'test1'"`, ); // Wrong value provided @@ -1021,7 +1021,7 @@ describe('createExtension', () => { .add(multi2Ext) .data(outputRef), ).toThrowErrorMatchingInlineSnapshot( - `"Failed to instantiate extension 'subject', Invalid data value provided, 'test2' was not declared"`, + `"Failed to instantiate extension 'subject', extension data 'test2' was provided but not declared"`, ); }); }); diff --git a/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.test.tsx b/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.test.tsx index efca17459b..508000acbb 100644 --- a/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.test.tsx +++ b/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.test.tsx @@ -462,7 +462,7 @@ describe('createExtensionBlueprint', () => { mockParentInputs, ), ).toThrowErrorMatchingInlineSnapshot( - `"Invalid override provided for input 'multi', when overriding the input data the length must match the original input data"`, + `"override data provided for input 'multi' must match the length of the original inputs"`, ); // Required input not provided @@ -484,7 +484,7 @@ describe('createExtensionBlueprint', () => { mockParentInputs, ), ).toThrowErrorMatchingInlineSnapshot( - `"Missing required data values for 'test1'"`, + `"missing required extension data value(s) 'test1'"`, ); // Wrong value provided @@ -512,7 +512,7 @@ describe('createExtensionBlueprint', () => { mockParentInputs, ), ).toThrowErrorMatchingInlineSnapshot( - `"Invalid data value provided, 'test2' was not declared"`, + `"extension data 'test2' was provided but not declared"`, ); // Forwarding entire inputs object @@ -706,7 +706,7 @@ describe('createExtensionBlueprint', () => { }).makeWithOverrides({ factory: orig => orig({}) }), ), ).toThrowErrorMatchingInlineSnapshot( - `"Invalid data value provided, 'test2' was not declared"`, + `"extension data 'test2' was provided but not declared"`, ); expect(() => @@ -722,7 +722,7 @@ describe('createExtensionBlueprint', () => { }).makeWithOverrides({ factory: orig => orig({}) }), ), ).toThrowErrorMatchingInlineSnapshot( - `"Missing required data values for 'test1'"`, + `"missing required extension data value(s) 'test1'"`, ); }); diff --git a/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.ts b/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.ts index cd6c0d6968..74d4426207 100644 --- a/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.ts +++ b/packages/frontend-plugin-api/src/wiring/createExtensionBlueprint.ts @@ -269,7 +269,7 @@ export function createDataContainer( if (verifyRefs) { if (!verifyRefs.delete(output.id)) { throw new Error( - `Invalid data value provided, '${output.id}' was not declared`, + `extension data '${output.id}' was provided but not declared`, ); } } @@ -281,7 +281,7 @@ export function createDataContainer( Array.from(verifyRefs.values()).filter(ref => !ref.config.optional); if (remainingRefs && remainingRefs.length > 0) { throw new Error( - `Missing required data values for '${remainingRefs + `missing required extension data value(s) '${remainingRefs .map(ref => ref.id) .join(', ')}'`, ); @@ -339,7 +339,7 @@ export function resolveInputOverrides( ); if (!originalInput) { throw new Error( - `A data override was provided for input '${name}', but no original input was present.`, + `attempted to override data of input '${name}' but it is not present in the original inputs`, ); } newInputs[name] = Object.assign(providedContainer, { @@ -350,12 +350,12 @@ export function resolveInputOverrides( const originalInput = expectArray(inputs[name]); if (!Array.isArray(providedData)) { throw new Error( - `Invalid override provided for input '${name}', expected an array`, + `override data provided for input '${name}' must be an array`, ); } if (originalInput.length !== providedData.length) { throw new Error( - `Invalid override provided for input '${name}', when overriding the input data the length must match the original input data`, + `override data provided for input '${name}' must match the length of the original inputs`, ); } newInputs[name] = providedData.map((data, i) => {