From 6db87572816690230278697a09e3acbee31e344d Mon Sep 17 00:00:00 2001 From: Glen Huang Date: Tue, 23 Sep 2025 22:50:22 +0800 Subject: [PATCH] ui/SectionService: not throwing errors inside the component rendering function --- pkgs/clan-app/ui/src/routes/Machine/SectionServices.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/clan-app/ui/src/routes/Machine/SectionServices.tsx b/pkgs/clan-app/ui/src/routes/Machine/SectionServices.tsx index b6222cd05..39d8827d2 100644 --- a/pkgs/clan-app/ui/src/routes/Machine/SectionServices.tsx +++ b/pkgs/clan-app/ui/src/routes/Machine/SectionServices.tsx @@ -19,10 +19,11 @@ export const SectionServices = () => { } return (ctx.machinesQuery.data[machineName].instance_refs ?? []) - .map((id) => { + .flatMap((id) => { const instance = ctx.serviceInstancesQuery.data?.[id]; if (!instance) { - throw new Error(`Service instance ${id} not found`); + console.error(`Service instance ${id} not found`); + return []; } const module = instance.module;