openclaw/src/slack/monitor
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
..
events feat(config): gate channel config writes 2026-01-15 01:41:15 +00:00
message-handler Slack: clear ack reaction after streaming replies (#2044) 2026-01-25 21:28:46 -06:00
allow-list.ts refactor: share allowlist match metadata 2026-01-18 01:49:25 +00:00
auth.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
channel-config.test.ts refactor: unify channel config matching and gating 2026-01-18 01:24:00 +00:00
channel-config.ts refactor(channels): centralize match metadata 2026-01-21 18:21:19 +00:00
commands.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
context.test.ts fix: normalize session keys and outbound mirroring 2026-01-24 11:57:11 +00:00
context.ts fix: groupPolicy: "open" ignored when channel-specific config exists 2026-01-24 07:05:55 +00:00
events.ts refactor(src): split oversized modules 2026-01-14 01:17:56 +00:00
media.test.ts fix(slack): handle file redirects 2026-01-26 17:01:22 +00:00
media.ts fix(slack): handle file redirects 2026-01-26 17:01:22 +00:00
message-handler.ts fix: resolve heartbeat sender and Slack thread_ts 2026-01-23 02:05:34 +00:00
policy.ts refactor: prune room legacy 2026-01-17 07:41:24 +00:00
provider.ts fix: reduce Slack WebClient retries 2026-01-23 06:31:53 +00:00
replies.ts fix: newline chunking across channels 2026-01-25 04:11:36 +00:00
slash.command-arg-menus.test.ts feat(slash-commands): usage footer modes 2026-01-18 05:35:35 +00:00
slash.policy.test.ts fix: cover slack open policy gating (#1563) (thanks @itsjaydesu) 2026-01-24 07:09:26 +00:00
slash.ts fix(gateway): gracefully handle AbortError and transient network errors (#2451) 2026-01-26 19:51:53 -06:00
thread-resolution.test.ts fix: resolve heartbeat sender and Slack thread_ts 2026-01-23 02:05:34 +00:00
thread-resolution.ts fix: resolve heartbeat sender and Slack thread_ts 2026-01-23 02:05:34 +00:00
types.ts fix: stabilize slack http receiver import 2026-01-18 15:44:17 +00:00