mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(execute-command): return partial output on timeout/maxBuffer instead of throwing
When a command times out or exceeds the buffer limit, the route returns partial stdout/stderr. Previously the handler threw an Error, discarding that output. Now returns partial output with an error field so downstream blocks can inspect it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,12 @@ export class ExecuteCommandBlockHandler implements BlockHandler {
|
||||
)
|
||||
|
||||
if (!result.success) {
|
||||
if (result.output) {
|
||||
return {
|
||||
...result.output,
|
||||
error: result.error || 'Command execution failed',
|
||||
}
|
||||
}
|
||||
throw new Error(result.error || 'Command execution failed')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user