ui/SectionService: not throwing errors inside the component rendering function

This commit is contained in:
Glen Huang
2025-09-23 22:50:22 +08:00
parent 18edf5f992
commit 6db8757281

View File

@@ -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;