mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-08 16:03:27 +00:00
fix: add extra args support for exception to bun scripts
This commit is contained in:
@@ -1105,6 +1105,16 @@ try {{
|
||||
if (step_id) {{
|
||||
err["step_id"] = step_id;
|
||||
}}
|
||||
const extra = {{}};
|
||||
Object.getOwnPropertyNames(e).forEach((key) => {{
|
||||
if (['line', 'name', 'stack', 'column', 'message', 'sourceURL', 'originalLine', 'originalColumn'].includes(key)) {{
|
||||
return;
|
||||
}}
|
||||
extra[key] = e[key];
|
||||
}});
|
||||
if (Object.keys(extra).length > 0) {{
|
||||
err["extra"] = extra;
|
||||
}}
|
||||
await fs.writeFile("result.json", JSON.stringify(err));
|
||||
process.exit(1);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user