Summary
Network failures in the Slack provider cause unhandled promise rejections that crash the entire gateway process, triggering launchd restart loops.
Steps to Reproduce
- Run gateway with Slack channel configured
- Experience network interruption (DNS failure, connectivity loss)
- Observe gateway crash and restart loop
Expected Behavior
Network failures in one channel provider should be handled gracefully with retry logic. The gateway should continue running and serving other channels (iMessage, etc.) even if Slack is temporarily unreachable.
Actual Behavior
[ERROR] socket-mode:SocketModeClient:2 Failed to retrieve a new WSS URL (error: Error: A request error occurred: getaddrinfo ENOTFOUND slack.com)
[openclaw] Unhandled promise rejection: Error: A request error occurred: getaddrinfo ENOTFOUND slack.com
at requestErrorWithOriginal (/opt/homebrew/lib/node_modules/openclaw/node_modules/@slack/web-api/src/errors.ts:82:5)
at WebClient.<anonymous> (/opt/homebrew/lib/node_modules/openclaw/node_modules/@slack/web-api/src/WebClient.ts:767:43)
The gateway crashes and launchd restarts it. If network is still down, it immediately crashes again, creating a rapid restart loop (~10 second intervals).
Environment
- OpenClaw: 2026.2.19-2
- Node.js: 25.6.0
- macOS: Darwin 24.6.0 (arm64)
- Running via launchd LaunchAgent
Impact
- Gateway becomes unavailable during network issues
- Restart loops can corrupt device pairing state (see related issue)
- All channels go down, not just Slack
Suggested Fix
Wrap Slack WebClient operations in try/catch and implement graceful degradation with exponential backoff retry.
Summary
Network failures in the Slack provider cause unhandled promise rejections that crash the entire gateway process, triggering launchd restart loops.
Steps to Reproduce
Expected Behavior
Network failures in one channel provider should be handled gracefully with retry logic. The gateway should continue running and serving other channels (iMessage, etc.) even if Slack is temporarily unreachable.
Actual Behavior
The gateway crashes and launchd restarts it. If network is still down, it immediately crashes again, creating a rapid restart loop (~10 second intervals).
Environment
Impact
Suggested Fix
Wrap Slack WebClient operations in try/catch and implement graceful degradation with exponential backoff retry.