core-app-api: sticky error for route resolution too

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-06-03 16:59:33 +02:00
parent a85c6f57e3
commit 5d464f8275
+9 -9
View File
@@ -297,22 +297,22 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
return loadedConfig.node;
}
if (!routeBindings) {
routeBindings = resolveRouteBindings(
this.bindRoutes,
loadedConfig.api,
this.plugins,
);
if (routeValidationError) {
throw routeValidationError;
} else if (!routeBindings) {
try {
routeBindings = resolveRouteBindings(
this.bindRoutes,
loadedConfig.api,
this.plugins,
);
validateRouteParameters(routing.paths, routing.parents);
validateRouteBindings(routeBindings, this.plugins);
} catch (error) {
routeValidationError = error;
throw error;
}
} else if (routeValidationError) {
throw routeValidationError;
}
// We can't register feature flags just after the element traversal, because the