From ef93ecc48149ffa66fdda4d72f21bca9b49de74b Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 7 Jun 2024 10:30:16 +0500 Subject: [PATCH] web: handle errors during bootstrapping --- apps/web/src/root.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/web/src/root.tsx b/apps/web/src/root.tsx index d28ea0a45..361881948 100644 --- a/apps/web/src/root.tsx +++ b/apps/web/src/root.tsx @@ -106,7 +106,12 @@ function RouteWrapper(props: { return Component; }, [component, path]); - if (result.status !== "fulfilled") + if (result.status === "rejected") { + throw result.reason instanceof Error + ? result.reason + : new Error(result.reason); + } + if (result.status === "pending") return (