oven-sh/bun · error · Error
BrotliFailedToLoad
Error message
BrotliFailedToLoad
What it means
Sentinel variant meaning the native brotli library could not be dynamically loaded at runtime. The codec is unavailable before any compression work starts; the tag string is a machine-readable name surfaced via name().
Solutions
- Verify the brotli library is present/loadable in the build
- Check the dynamic-library loading path configuration
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/brotli/error.rs:3 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/e3c7177171333d1b.
Report an issue: GitHub.
Appendix: source
Thrown at src/brotli/error.rs:3
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
pub enum Error {
#[error("BrotliFailedToLoad")]
BrotliFailedToLoad,
#[error("BrotliFailedToCreateInstance")]
BrotliFailedToCreateInstance,
#[error("BrotliDecompressionError")]
BrotliDecompressionError,
#[error("ShortRead")]
ShortRead,
}
impl Error {
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn name(&self) -> &'static str {
match self {
Self::BrotliFailedToLoad => "BrotliFailedToLoad",
Self::BrotliFailedToCreateInstance => "BrotliFailedToCreateInstance",
Self::BrotliDecompressionError => "BrotliDecompressionError",
Self::ShortRead => "ShortRead",
}View on GitHub (pinned to 8c5296ac45)