From 60f885e1eb7ca49cc1fed887b535b2c2f7d5f898 Mon Sep 17 00:00:00 2001 From: Taksh Pratap Singh Date: Fri, 14 Nov 2025 15:56:36 -0500 Subject: [PATCH] Improve error message with JSON.stringify --- modal-js/src/sandbox.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modal-js/src/sandbox.ts b/modal-js/src/sandbox.ts index 1f9961ec..6810d151 100644 --- a/modal-js/src/sandbox.ts +++ b/modal-js/src/sandbox.ts @@ -764,7 +764,7 @@ export class Sandbox { } if (resp.taskResult) { throw new Error( - `Sandbox ${this.sandboxId} has already completed with result: ${resp.taskResult}`, + `Sandbox ${this.sandboxId} has already completed with result: ${JSON.stringify(resp.taskResult)}`, ); } this.#taskId = resp.taskId;