diff --git a/backend/server/src/index.ts b/backend/server/src/index.ts index 546e3a4..f3af14a 100644 --- a/backend/server/src/index.ts +++ b/backend/server/src/index.ts @@ -124,7 +124,8 @@ io.on("connection", async (socket) => { Object.entries(sandboxManager.handlers()).forEach(([event, handler]) => { socket.on(event, async (options: any, callback?: (response: any) => void) => { try { - callback?.(await handler(options)); + const result = await handler(options) + callback?.(result); } catch (e: any) { handleErrors(`Error processing event "${event}":`, e, socket); }