Merge pull request #31082 from backstage/rugvip/errors

frontend-app-api: new error handling for app startup
This commit is contained in:
Patrik Oldsberg
2025-09-15 17:14:48 +02:00
committed by GitHub
24 changed files with 1877 additions and 856 deletions
@@ -1078,7 +1078,7 @@ describe('createExtension', () => {
.add(multi2Ext)
.get(outputRef),
).toThrowErrorMatchingInlineSnapshot(
`"Failed to instantiate extension 'subject', override data provided for input 'multi' must match the length of the original inputs"`,
`"Failed to resolve the extension tree: Failed to instantiate extension 'subject', override data provided for input 'multi' must match the length of the original inputs"`,
);
// Mix forward and data override
@@ -1101,7 +1101,7 @@ describe('createExtension', () => {
.add(multi2Ext)
.get(outputRef),
).toThrowErrorMatchingInlineSnapshot(
`"Failed to instantiate extension 'subject', override data for input 'multi' may not mix forwarded inputs with data overrides"`,
`"Failed to resolve the extension tree: Failed to instantiate extension 'subject', override data for input 'multi' may not mix forwarded inputs with data overrides"`,
);
// Required input not provided
@@ -1124,7 +1124,7 @@ describe('createExtension', () => {
.add(multi2Ext)
.get(outputRef),
).toThrowErrorMatchingInlineSnapshot(
`"Failed to instantiate extension 'subject', missing required extension data value(s) 'test1'"`,
`"Failed to resolve the extension tree: Failed to instantiate extension 'subject', missing required extension data value(s) 'test1'"`,
);
// Wrong value provided
@@ -1153,7 +1153,7 @@ describe('createExtension', () => {
.add(multi2Ext)
.get(outputRef),
).toThrowErrorMatchingInlineSnapshot(
`"Failed to instantiate extension 'subject', extension data 'test2' was provided but not declared"`,
`"Failed to resolve the extension tree: Failed to instantiate extension 'subject', extension data 'test2' was provided but not declared"`,
);
});
});