{"record":{"id":"bcbf436e972023f9","repo":"oven-sh/bun","slug":"failedtoopensocket-bcbf43","errorCode":"FailedToOpenSocket","errorMessage":"FailedToOpenSocket","messagePattern":"FailedToOpenSocket","errorType":"error_code","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"src/http/error.rs","lineNumber":94,"sourceCode":"    #[error(\"ShortRead\")]\n    ShortRead,\n    #[error(\"WantRead\")]\n    WantRead,\n    #[error(\"WantWrite\")]\n    WantWrite,\n    #[error(\"HTTP3HandshakeFailed\")]\n    HTTP3HandshakeFailed,\n    #[error(\"HTTP3ProtocolError\")]\n    HTTP3ProtocolError,\n    #[error(\"HTTP3HeaderEncodingError\")]\n    HTTP3HeaderEncodingError,\n    #[error(\"DNSResolutionFailed\")]\n    DNSResolutionFailed,\n    #[error(\"HTTP3StreamReset\")]\n    HTTP3StreamReset,\n    #[error(\"HTTP3ContentLengthMismatch\")]\n    HTTP3ContentLengthMismatch,\n    #[error(\"FailedToOpenSocket\")]\n    FailedToOpenSocket,\n    #[error(\"InvalidCRL\")]\n    InvalidCRL,\n    #[error(\"UnsupportedProxyProtocol\")]\n    UnsupportedProxyProtocol,\n    #[error(transparent)]\n    Cert(#[from] CertError),\n    #[error(transparent)]\n    Alloc(#[from] bun_alloc::AllocError),\n    #[error(transparent)]\n    Hpack(#[from] crate::lshpack::HpackError),\n    #[error(transparent)]\n    Core(#[from] bun_core::Error),\n    #[error(transparent)]\n    Sys(#[from] bun_errno::SystemErrno),\n    #[error(transparent)]\n    Zlib(bun_zlib::ZlibError),\n    #[error(transparent)]","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/http/error.rs#L76-L112","documentation":"The socket could not be opened for the outgoing connection. Fires when socket(), bind(), or connect() syscalls fail — due to fd exhaustion, address family unavailability, or permission errors — before any network I/O begins.","triggerScenarios":"Thrown at src/http/error.rs:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the system file descriptor limit (ulimit -n) and raise it if exhausted","Verify the address family (IPv4/IPv6) is available and configured on the host","Check for socket permission issues (e.g., binding to privileged ports)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}