This commit is contained in:
Adria Navarro 2024-01-24 17:40:13 +01:00
parent c21aa25fcf
commit 73c977d6fb
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ module.exports.processJS = (handlebars, context) => {
const res = { data: runJS(js, sandboxContext) } const res = { data: runJS(js, sandboxContext) }
return `{{${LITERAL_MARKER} js_result-${JSON.stringify(res)}}}` return `{{${LITERAL_MARKER} js_result-${JSON.stringify(res)}}}`
} catch (error) { } catch (error) {
if (error.message === "Script execution timed out.") { if (error.code === "ERR_SCRIPT_EXECUTION_TIMEOUT") {
return "Timed out while executing JS" return "Timed out while executing JS"
} }
if (error.name === "ExecutionTimeoutError") { if (error.name === "ExecutionTimeoutError") {