From 7899201594b60571580188dc38037ebe90da2768 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Thu, 21 Sep 2023 10:04:34 +0200 Subject: [PATCH] refactor(frontend-app-api): rephrase root overriding error message Signed-off-by: Camila Belo --- packages/frontend-app-api/src/wiring/createApp.test.tsx | 2 +- packages/frontend-app-api/src/wiring/parameters.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/frontend-app-api/src/wiring/createApp.test.tsx b/packages/frontend-app-api/src/wiring/createApp.test.tsx index c06afeccc6..5702077c89 100644 --- a/packages/frontend-app-api/src/wiring/createApp.test.tsx +++ b/packages/frontend-app-api/src/wiring/createApp.test.tsx @@ -68,7 +68,7 @@ describe('createInstances', () => { }), ]; expect(() => createInstances({ config, plugins })).toThrow( - 'The following plugins are overriding root extensions and root extensions cannot be overridden: plugin', + "The following plugin(s) are overriding the 'root' extension which is forbidden: plugin", ); }); diff --git a/packages/frontend-app-api/src/wiring/parameters.ts b/packages/frontend-app-api/src/wiring/parameters.ts index 0711f90665..0605d34001 100644 --- a/packages/frontend-app-api/src/wiring/parameters.ts +++ b/packages/frontend-app-api/src/wiring/parameters.ts @@ -206,7 +206,9 @@ export function mergeExtensionParameters(options: { .filter(({ id }) => id === 'root') .map(({ source }) => source.id); throw new Error( - `The following plugins are overriding root extensions and root extensions cannot be overridden: ${rootPluginIds}`, + `The following plugin(s) are overriding the 'root' extension which is forbidden: ${rootPluginIds.join( + ',', + )}`, ); }