diff --git a/packages/core/application/core-application-browser-internal/src/application_service.test.ts b/packages/core/application/core-application-browser-internal/src/application_service.test.ts index 073ce6099830e..89b34876e50c9 100644 --- a/packages/core/application/core-application-browser-internal/src/application_service.test.ts +++ b/packages/core/application/core-application-browser-internal/src/application_service.test.ts @@ -98,7 +98,9 @@ describe('#setup()', () => { await service.start(startDeps); expect(() => register(Symbol(), createApp({ id: 'app1' })) - ).toThrowErrorMatchingInlineSnapshot(`"Applications cannot be registered after \\"setup\\""`); + ).toThrowErrorMatchingInlineSnapshot( + `"Applications cannot be registered after \\"setup\\" (attempted to register \\"app1\\")"` + ); }); it('allows to register an AppUpdater for the application', async () => { diff --git a/packages/core/application/core-application-browser-internal/src/application_service.tsx b/packages/core/application/core-application-browser-internal/src/application_service.tsx index b30f4ce650730..0b1f0f3ec6431 100644 --- a/packages/core/application/core-application-browser-internal/src/application_service.tsx +++ b/packages/core/application/core-application-browser-internal/src/application_service.tsx @@ -182,7 +182,9 @@ export class ApplicationService { const validateApp = (app: App) => { if (this.registrationClosed) { - throw new Error(`Applications cannot be registered after "setup"`); + throw new Error( + `Applications cannot be registered after "setup" (attempted to register "${app.id}")` + ); } else if (!applicationIdRegexp.test(app.id)) { throw new Error( `Invalid application id: it can only be composed of alphanum chars, '-' and '_'`