openclaw-vainplex/src
Glucksberg 481bd333eb
fix(gateway): gracefully handle AbortError and transient network errors (#2451)
* fix(tts): generate audio when block streaming drops final reply

When block streaming succeeds, final replies are dropped but TTS was only
applied to final replies. Fix by accumulating block text during streaming
and generating TTS-only audio after streaming completes.

Also:
- Change truncate vs skip behavior when summary OFF (now truncates)
- Align TTS limits with Telegram max (4096 chars)
- Improve /tts command help messages with examples
- Add newline separator between accumulated blocks

* fix(tts): add error handling for accumulated block TTS

* feat(tts): add descriptive inline menu with action descriptions

- Add value/label support for command arg choices
- TTS menu now shows descriptive title listing each action
- Capitalize button labels (On, Off, Status, etc.)
- Update Telegram, Discord, and Slack handlers to use labels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(gateway): gracefully handle AbortError and transient network errors

Addresses issues #1851, #1997, and #2034.

During config reload (SIGUSR1), in-flight requests are aborted, causing
AbortError exceptions. Similarly, transient network errors (fetch failed,
ECONNRESET, ETIMEDOUT, etc.) can crash the gateway unnecessarily.

This change:
- Adds isAbortError() to detect intentional cancellations
- Adds isTransientNetworkError() to detect temporary connectivity issues
- Logs these errors appropriately instead of crashing
- Handles nested cause chains and AggregateError

AbortError is logged as a warning (expected during shutdown).
Network errors are logged as non-fatal errors (will resolve on their own).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(test): update commands-registry test expectations

Update test expectations to match new ResolvedCommandArgChoice format
(choices now return {label, value} objects instead of plain strings).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: harden unhandled rejection handling and tts menus (#2451) (thanks @Glucksberg)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Shadow <hi@shadowing.dev>
2026-01-26 19:51:53 -06:00
..
acp fix: stabilize acp streams and tests 2026-01-18 08:54:00 +00:00
agents fix: clean up session locks on exit (#2483) (thanks @janeexai) 2026-01-26 19:48:46 -06:00
auto-reply fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
browser Browser: add URL fallback for relay tab matching (#1999) 2026-01-25 21:04:41 -06:00
canvas-host chore: update a2ui bundle hash 2026-01-22 08:48:09 +00:00
channels feat(telegram): add edit message action (#2394) (thanks @marcelomar21) 2026-01-26 15:34:47 -08:00
cli CLI: expand versioned node argv handling 2026-01-26 20:29:47 -05:00
commands test(auth): update auth profile coverage 2026-01-26 19:05:00 +00:00
config Telegram: harden network retries and config 2026-01-26 19:36:43 -05:00
cron fix(security): prevent prompt injection via external hooks (gmail, we… (#1827) 2026-01-26 13:34:04 +00:00
daemon test: stabilize service-env path tests on windows 2026-01-24 04:36:52 +00:00
discord fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
docs bugfix:The Mintlify navbar (logo + search bar with ⌘K) scrolls away w… (#2445) 2026-01-26 17:39:10 -08:00
gateway fix(gateway): sanitize error responses to prevent information disclosure 2026-01-26 17:22:13 -06:00
hooks refactor: centralize config update logging 2026-01-23 04:01:26 +00:00
imessage fix(imessage): normalize messaging targets (#1708) 2026-01-25 13:43:32 +00:00
infra fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
line line: centralize webhook signature validation 2026-01-26 19:21:26 -06:00
link-understanding Add link understanding tool support (#1637) 2026-01-25 00:15:54 +00:00
logging fix: gate diagnostic logs behind verbose 2026-01-24 05:06:42 +00:00
macos fix: type gateway lock handle 2026-01-21 23:05:11 +00:00
markdown fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
media fix: harden url fetch dns pinning 2026-01-26 16:05:29 +00:00
media-understanding fix: skip image understanding for vision models (#1747) 2026-01-25 09:57:19 +00:00
memory chore: filter noisy warnings 2026-01-24 10:48:33 +00:00
node-host fix: honor tools.exec ask/security in approvals 2026-01-24 04:53:44 +00:00
pairing feat: add /allowlist command 2026-01-21 05:34:53 +00:00
plugin-sdk feat(plugins): sync plugin commands to Telegram menu and export gateway types 2026-01-26 22:28:14 +05:30
plugins feat: Add Line plugin (#1630) 2026-01-25 12:22:36 +00:00
process fix: harden exec spawn fallback 2026-01-25 06:37:39 +00:00
providers fix: log config update in copilot auth 2026-01-23 07:23:52 +00:00
routing Routing: precompile session key regexes (#1697) 2026-01-25 21:15:20 -06:00
security fix(security): properly test Windows ACL audit for config includes (#2403) 2026-01-26 16:27:53 -08:00
sessions fix: inherit model overrides for thread sessions 2026-01-22 06:03:23 +00:00
shared/text fix: unify reasoning tags + agent ids (#1613) (thanks @kyleok) (#1629) 2026-01-24 19:56:02 +00:00
signal fix: stop sending tool summaries to channels 2026-01-25 11:54:29 +00:00
slack fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
telegram fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
terminal fix: clarify auth order exclusions 2026-01-24 01:18:03 +00:00
test-helpers refactor: add hook guards and test helpers 2026-01-18 06:15:24 +00:00
test-utils feat: Add Line plugin (#1630) 2026-01-25 12:22:36 +00:00
tts fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
tui TUI: guard against overflow width crashes (#1686) 2026-01-25 21:18:16 -06:00
types TTS: gate auto audio on inbound voice notes (#1667) 2026-01-25 04:35:20 +00:00
utils feat: Add Line plugin (#1630) 2026-01-25 12:22:36 +00:00
web fix: stop sending tool summaries to channels 2026-01-25 11:54:29 +00:00
whatsapp refactor: prune legacy group prefixes 2026-01-17 08:47:25 +00:00
wizard refactor(auth)!: remove external CLI OAuth reuse 2026-01-26 19:05:00 +00:00
channel-web.barrel.test.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
channel-web.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
docker-setup.test.ts fix: update docker gateway command 2026-01-24 03:24:28 +00:00
entry.ts chore: filter noisy warnings 2026-01-24 10:48:33 +00:00
git-hooks.test.ts fix: add git hook setup and stable config hash sorting 2026-01-19 02:02:17 +00:00
globals.test.ts chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
globals.ts CLI: streamline startup paths and env parsing 2026-01-18 23:10:39 +00:00
index.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
index.ts fix: tame invalid config logging 2026-01-21 01:58:47 +00:00
logger.test.ts fix: align rolling logs to local time 2026-01-22 07:02:52 +00:00
logger.ts refactor(logging): split config + subsystem imports 2026-01-19 00:15:44 +00:00
logging.ts fix: unblock bundled plugin load 2026-01-18 19:34:21 +00:00
polls.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
polls.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
postinstall-patcher.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
runtime.ts perf: speed up memory batch polling 2026-01-18 03:55:14 +00:00
utils.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
utils.ts refactor: centralize config update logging 2026-01-23 04:01:26 +00:00
version.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00