{"record":{"id":"f1c88a5ce501797d","repo":"oven-sh/bun","slug":"invalidhttpresponse","errorCode":null,"errorMessage":"InvalidHTTPResponse","messagePattern":"InvalidHTTPResponse","errorType":"exception","errorClass":"bun_http::Error","httpStatus":null,"severity":"error","filePath":"src/http/error.rs","lineNumber":58,"sourceCode":"    #[error(\"HTTP2Unsupported\")]\n    HTTP2Unsupported,\n    #[error(\"ConnectionClosed\")]\n    ConnectionClosed,\n    #[error(\"DNSResolveFailed\")]\n    DNSResolveFailed,\n    #[error(\"ConnectionRefused\")]\n    ConnectionRefused,\n    #[error(\"TooManyRedirects\")]\n    TooManyRedirects,\n    #[error(\"HTTP3Unsupported\")]\n    HTTP3Unsupported,\n    #[error(\"ResponseHeadersTooLarge\")]\n    ResponseHeadersTooLarge,\n    #[error(\"UnrequestedUpgrade\")]\n    UnrequestedUpgrade,\n    #[error(\"UnexpectedData\")]\n    UnexpectedData,\n    #[error(\"InvalidHTTPResponse\")]\n    InvalidHTTPResponse,\n    #[error(\"InvalidContentLength\")]\n    InvalidContentLength,\n    #[error(\"UnsupportedTransferEncoding\")]\n    UnsupportedTransferEncoding,\n    #[error(\"RequestBodyNotReusable\")]\n    RequestBodyNotReusable,\n    #[error(\"UnsupportedRedirectProtocol\")]\n    UnsupportedRedirectProtocol,\n    #[error(\"RedirectURLTooLong\")]\n    RedirectURLTooLong,\n    #[error(\"RedirectURLInvalid\")]\n    RedirectURLInvalid,\n    #[error(\"InvalidRedirectURL\")]\n    InvalidRedirectURL,\n    #[error(\"UnexpectedRedirect\")]\n    UnexpectedRedirect,\n    #[error(\"ShortRead\")]","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/http/error.rs#L40-L76","documentation":"The server's response is not a valid HTTP response. Fires when the status line, headers, or framing violate HTTP syntax rules so severely the response cannot be parsed at all (e.g., garbage bytes, missing status line).","triggerScenarios":"Thrown at src/http/error.rs:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the raw response bytes to determine what was actually returned","Check if an HTTPS request was made to an HTTP port (or vice versa)","Verify no intermediary proxy is returning non-HTTP data"],"exampleFix":null,"handlingStrategy":"try-catch","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"}