From 73c977d6fb700d73bfe63a1dbb0fb38fd861ecf5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 24 Jan 2024 17:40:13 +0100 Subject: [PATCH] Fix test --- packages/string-templates/src/helpers/javascript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/string-templates/src/helpers/javascript.js b/packages/string-templates/src/helpers/javascript.js index 81dc69b8ec..0b63400deb 100644 --- a/packages/string-templates/src/helpers/javascript.js +++ b/packages/string-templates/src/helpers/javascript.js @@ -56,7 +56,7 @@ module.exports.processJS = (handlebars, context) => { const res = { data: runJS(js, sandboxContext) } return `{{${LITERAL_MARKER} js_result-${JSON.stringify(res)}}}` } catch (error) { - if (error.message === "Script execution timed out.") { + if (error.code === "ERR_SCRIPT_EXECUTION_TIMEOUT") { return "Timed out while executing JS" } if (error.name === "ExecutionTimeoutError") {