diff --git a/packages/server/hooks/plug_space_primitives.ts b/packages/server/hooks/plug_space_primitives.ts index 5fb01b9..4dc7951 100644 --- a/packages/server/hooks/plug_space_primitives.ts +++ b/packages/server/hooks/plug_space_primitives.ts @@ -29,8 +29,12 @@ export class PlugSpacePrimitives implements SpacePrimitives { let allPages = new Set(); for (let { plug, name, operation } of this.hook.spaceFunctions) { if (operation === "listPages") { - for (let pm of await plug.invoke(name, [])) { - allPages.add(pm); + try { + for (let pm of await plug.invoke(name, [])) { + allPages.add(pm); + } + } catch (e) { + console.error("Error listing pages", e); } } }