From 5d464f82752406d1fd82d5db47ad3192b00b1c81 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 3 Jun 2024 16:59:33 +0200 Subject: [PATCH] core-app-api: sticky error for route resolution too Signed-off-by: Patrik Oldsberg --- packages/core-app-api/src/app/AppManager.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/core-app-api/src/app/AppManager.tsx b/packages/core-app-api/src/app/AppManager.tsx index 48501b52de..b28b843d34 100644 --- a/packages/core-app-api/src/app/AppManager.tsx +++ b/packages/core-app-api/src/app/AppManager.tsx @@ -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