{"record":{"id":"1fd47a95f2afe6e2","repo":"oven-sh/bun","slug":"brotlidecompressionerror","errorCode":null,"errorMessage":"BrotliDecompressionError","messagePattern":"BrotliDecompressionError","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/brotli/error.rs","lineNumber":7,"sourceCode":"#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]\npub enum Error {\n    #[error(\"BrotliFailedToLoad\")]\n    BrotliFailedToLoad,\n    #[error(\"BrotliFailedToCreateInstance\")]\n    BrotliFailedToCreateInstance,\n    #[error(\"BrotliDecompressionError\")]\n    BrotliDecompressionError,\n    #[error(\"ShortRead\")]\n    ShortRead,\n}\n\nimpl Error {\n    #[allow(clippy::trivially_copy_pass_by_ref)]\n    pub fn name(&self) -> &'static str {\n        match self {\n            Self::BrotliFailedToLoad => \"BrotliFailedToLoad\",\n            Self::BrotliFailedToCreateInstance => \"BrotliFailedToCreateInstance\",\n            Self::BrotliDecompressionError => \"BrotliDecompressionError\",\n            Self::ShortRead => \"ShortRead\",\n        }\n    }\n}\n\nimpl bun_core::output::ErrName for Error {","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/brotli/error.rs#L1-L25","documentation":"Sentinel variant of the brotli Error enum: the underlying brotli decoder (via the vendored library) reported a decompression failure, i.e. the input bytes were not a valid brotli stream or were corrupt mid-stream. The bare machine-readable name is the entire message; callers are expected to switch on the variant rather than parse the string.","triggerScenarios":"Thrown at src/brotli/error.rs:7 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the payload is actually brotli-compressed and complete","Check for upstream truncation or wrong Content-Encoding handling"],"exampleFix":null,"handlingStrategy":"validation","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"}