pbakaus/impeccable · error
Reply failed: {}
Error message
Reply failed: {}
What it means
Generic failure path for the reply POST: any `PollError::AckTimeout(m)` or `PollError::Other(m)` is printed as `Reply failed: <m>` and the command exits 1. The `{}` placeholder carries the underlying message — either the server never acknowledged the reply in time, or the HTTP request failed with some other error.
Source
Thrown at crates/live/src/live_poll.rs:735
return 1;
}
};
return match post_reply(&base, &token, &reply) {
Ok(()) => 0,
Err(PollError::ConnRefused) => {
io.err(&format!(
"Live server not running. Start one with: {}\n",
script_cmd(&env, &cwd, "live")
));
1
}
Err(PollError::Auth) => {
// JS: a 401 on the reply POST is a non-ok response -> "Reply failed: <body.error>"
io.err("Reply failed: Unauthorized\n");
1
}
Err(PollError::AckTimeout(m)) | Err(PollError::Other(m)) => {
io.err(&format!("Reply failed: {}\n", m));
1
}
};
}
let stream_mode = argv.iter().any(|a| a == "--stream");
let types_arg = argv
.iter()
.find(|a| a.starts_with("--types="))
.map(|a| a["--types=".len()..].to_string());
let types = normalize_poll_types(types_arg.as_deref());
let ack_timeout_ms = arg_value_int(&argv, "--ack-timeout=", 600_000);
if stream_mode {
io.err("[impeccable-poll] stream mode: one JSON object per line on stdout; use --reply while this process stays running\n");
loop {
let event = match fetch_next_event(&base, &token, None, &types) {
Ok(e) => e,View on GitHub (pinned to 2bc2879276)
Solutions
- Retry the reply once the live server is responsive (check with a simple poll or curl).
- Restart the live server if it is consistently failing to ack, then retry.
- Read the interpolated message in the actual output to identify the specific underlying cause (timeout vs HTTP error body).
Example fix
// before $ impeccable live-poll --reply --reply-text hi Reply failed: ack timed out after 5000ms // after $ ./scripts/impeccable live & # restart a healthy server $ impeccable live-poll --reply --reply-text hi
Defensive patterns
Strategy: try-catch
Try / catch
// catch any 'Reply failed: <msg>' exit and surface the interpolated message for diagnosis
try {
execSync('impeccable live-poll --reply --reply-text "..."', { stdio: 'pipe' });
} catch (e) {
const msg = String(e.stderr).match(/^Reply failed: (.*)$/m)?.[1];
console.error('reply failed, underlying cause:', msg);
// AckTimeout -> restart server and retry; other -> report
} Prevention
- Parse the interpolated message rather than assuming a single failure mode.
- Add a bounded retry with backoff for AckTimeout-shaped failures.
- Keep the live server healthy (restart on crash) so acks arrive within the timeout window.
When it happens
Trigger: `impeccable live-poll --reply` where `post_reply` returns AckTimeout (server did not ack within the timeout window) or Other (any non-401 HTTP/transport error, e.g. a 500 or malformed response).
Common situations: Live server busy or hung so the ack times out; server version mismatch producing an unexpected response; transient loopback failure mid-POST; server returning a non-OK status with an error body.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- Status failed: ${res.status} ${res.statusText}
- Poll failed: ${res.status} ${res.statusText}
- {}
- Reply failed: Unauthorized
- Timed out waiting for live server to start.
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/64a0e6c868329828.
Report an issue: GitHub.