Worker error details are dropped: failed commands show 'Failed' with no reason or exit code #14

Open
opened 2026-09-08 20:57:23 -04:00 by jared · 0 comments
Owner

Overview

On failure the worker sends error: error.message (e.g. Command failed: … Killed on timeout, or the non-zero exit summary). The server's command_result handler copies only success, stdout, stderr, duration into the log entry, so error is lost; duration is also not sent on the failure path. The frontend already renders log.error if present.

Users cannot distinguish a timeout from a non-zero exit from a missing binary, and see no duration for failed runs.

Where

  • server.js ws.on('message')command_result branch (addExecutionLog).
  • worker/worker.js executeCommand() catch block – add exitCode: error.code, signal: error.signal, duration, timedOut: error.killed.

Suggested fix

Persist error, exit_code, signal, timed_out, duration and show them in the detail modal and toast ("exit 127", "timed out after 60s").

## Overview On failure the worker sends `error: error.message` (e.g. `Command failed: … Killed` on timeout, or the non-zero exit summary). The server's `command_result` handler copies only `success, stdout, stderr, duration` into the log entry, so `error` is lost; `duration` is also not sent on the failure path. The frontend already renders `log.error` if present. Users cannot distinguish a timeout from a non-zero exit from a missing binary, and see no duration for failed runs. ## Where - `server.js` `ws.on('message')` → `command_result` branch (`addExecutionLog`). - `worker/worker.js` `executeCommand()` catch block – add `exitCode: error.code`, `signal: error.signal`, `duration`, `timedOut: error.killed`. ## Suggested fix Persist `error`, `exit_code`, `signal`, `timed_out`, `duration` and show them in the detail modal and toast ("exit 127", "timed out after 60s").
jared added the buguxbackendworkerexecutionspriority/medium labels 2026-09-08 20:57:23 -04:00
Sign in to join this conversation.