Skip to content

Gateway crashes on network loss instead of graceful degradation #12354

@lucca-alma

Description

@lucca-alma

Summary

When network connectivity is lost, the gateway crashes instead of gracefully falling back to local/alternative providers.

Environment

  • OpenClaw version: Latest (npm install)
  • OS: macOS (Darwin 24.6.0 arm64)
  • Node: v23.11.0

Steps to Reproduce

  1. Configure fallback provider (e.g., local Ollama)
  2. Start gateway with Slack plugin enabled
  3. Disconnect network (e.g., disable Wi-Fi)
  4. Observe gateway crash

Expected Behavior

Gateway should gracefully fall back to configured fallback provider when primary provider is unreachable.

Actual Behavior

Slack plugin throws an unhandled promise rejection that kills the entire gateway process.

Relevant Logs

UnhandledPromiseRejection from Slack plugin when network drops
(Full stack trace available on request)

Suggested Fix

Wrap network-dependent operations in try/catch with graceful fallback behavior. Consider:

  • Retry with exponential backoff
  • Fall back to configured secondary provider
  • Queue messages for retry when connectivity restored

Workaround

None currently — gateway must be manually restarted after network restoration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions