From d80ffc4ad2658fcfb8dc60dd964d563dc3fe0dcb Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Wed, 17 Dec 2025 17:36:49 +0000 Subject: [PATCH] website: Show playground errors If there eval errors for playground examples, show the error. Signed-off-by: Charlie Egan --- docs/src/lib/playground.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/src/lib/playground.js b/docs/src/lib/playground.js index 3c4222082a..5f8293c7d5 100644 --- a/docs/src/lib/playground.js +++ b/docs/src/lib/playground.js @@ -44,10 +44,14 @@ async function exec({ command, files }) { stdout: JSON.stringify(body.result[0].expressions[0].value, undefined, 2), }; } - const { message: stderr } = await resp.json(); + + const errorText = await resp.text(); return { ok, - stderr, + stderr: errorText + .replace(/^"|"$/g, "") + .replace(/\\n/g, "\n") + .replace(/\\t/g, "\t"), }; }