Skip to content

[Bug]: Unhandled EHOSTUNREACH in SSRF/Telegram module causes Gateway crash #71529

Description

@RoseKongPS

Bug type

Stability bug (crash)

Summary

When the host network is temporarily unreachable (e.g., ISP hiccup, DNS timeout), the SSRF/Telegram module in the Gateway throws an unhandled EHOSTUNREACH error that crashes the entire Gateway process.

Steps to reproduce

  1. Run OpenClaw Gateway as a LaunchAgent service
  2. Experience a temporary network interruption (ISP-level, not just Telegram API outage)
  3. Observe: Gateway crashes with uncaught exception in SSRF module

Expected behavior

Gateway should catch EHOSTUNREACH and other transient network errors gracefully — log the error, back off, and retry — without crashing the process.

Actual behavior

Gateway process crashes. Requires LaunchAgent KeepAlive: true to auto-restart, which creates a brief service interruption for all connected channels.

Environment

  • OpenClaw: 2026.4.23 (a979721)
  • OS: macOS 26.3 (arm64)
  • Install: Homebrew package
  • Channel: Telegram (likely affects all channels using SSRF)

Logs

Error: connect EHOSTUNREACH <ip>:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:... )

(Full stack trace involves the SSRF module's fetch/request path to Telegram API)

Impact

Any transient network hiccup causes a full Gateway restart, disrupting all active sessions and in-progress tool calls. With LaunchAgent watchdog this auto-recovers, but the interruption is non-trivial during active work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions