From 161059551b103e9999d321b7983eb0f8e07f2efc Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 28 Jun 2025 18:23:30 +1000 Subject: [PATCH] fix(ui): handle errors during cleanup --- invokeai/frontend/web/src/services/api/run-graph.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/services/api/run-graph.ts b/invokeai/frontend/web/src/services/api/run-graph.ts index b369a45420..206027bd93 100644 --- a/invokeai/frontend/web/src/services/api/run-graph.ts +++ b/invokeai/frontend/web/src/services/api/run-graph.ts @@ -159,7 +159,11 @@ export const runGraph = (arg: RunGraphArg): Promise => { const cleanupFunctions: Set<() => void> = new Set(); const cleanup = () => { for (const func of cleanupFunctions) { - func(); + try { + func(); + } catch (error) { + log.warn({ error: parseify(error) }, 'Error during cleanup'); + } } };