oven-sh/bun · error · TypeError

DNSResolveFailed

DNSResolveFailed

Error message

DNSResolveFailed

What it means

DNS resolution for the request hostname failed. Fires when the system resolver (or async DNS module) cannot resolve the hostname to an IP address, indicating NXDOMAIN, resolver failure, or network issues.

Solutions

  1. Verify the hostname is spelled correctly and exists in DNS
  2. Check DNS server configuration and /etc/resolv.conf
  3. Test resolution with dig or nslookup to isolate the issue
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/http/error.rs:44 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/f4781d324a47ce9e. Report an issue: GitHub.

Appendix: source

Thrown at src/http/error.rs:44

    #[error("HTTP2GoAway")]
    HTTP2GoAway,
    #[error("HTTP2CompressionError")]
    HTTP2CompressionError,
    #[error("Timeout")]
    Timeout,
    #[error("AbortedBeforeConnecting")]
    AbortedBeforeConnecting,
    #[error("InvalidURL")]
    InvalidURL,
    #[error("ERR_TLS_CERT_ALTNAME_INVALID")]
    ERR_TLS_CERT_ALTNAME_INVALID,
    #[error("ClientAborted")]
    ClientAborted,
    #[error("HTTP2Unsupported")]
    HTTP2Unsupported,
    #[error("ConnectionClosed")]
    ConnectionClosed,
    #[error("DNSResolveFailed")]
    DNSResolveFailed,
    #[error("ConnectionRefused")]
    ConnectionRefused,
    #[error("TooManyRedirects")]
    TooManyRedirects,
    #[error("HTTP3Unsupported")]
    HTTP3Unsupported,
    #[error("ResponseHeadersTooLarge")]
    ResponseHeadersTooLarge,
    #[error("UnrequestedUpgrade")]
    UnrequestedUpgrade,
    #[error("UnexpectedData")]
    UnexpectedData,
    #[error("InvalidHTTPResponse")]
    InvalidHTTPResponse,
    #[error("InvalidContentLength")]
    InvalidContentLength,
    #[error("UnsupportedTransferEncoding")]

View on GitHub (pinned to 8c5296ac45)