{"record":{"id":"04d5e229b52d655f","repo":"oven-sh/bun","slug":"syntaxerror","errorCode":null,"errorMessage":"SyntaxError","messagePattern":"SyntaxError","errorType":"error_code","errorClass":"bun_ast::Error","httpStatus":null,"severity":"error","filePath":"src/ast/error.rs","lineNumber":5,"sourceCode":"#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]\npub enum Error {\n    #[error(\"Clobber\")]\n    Clobber,\n    #[error(\"SyntaxError\")]\n    SyntaxError,\n    #[error(\"ModuleNotFound\")]\n    ModuleNotFound,\n    #[error(transparent)]\n    Alloc(#[from] bun_alloc::AllocError),\n}\n\nimpl Error {\n    #[allow(clippy::trivially_copy_pass_by_ref)]\n    pub fn name(&self) -> &'static str {\n        match self {\n            Self::Clobber => \"Clobber\",\n            Self::SyntaxError => \"SyntaxError\",\n            Self::ModuleNotFound => \"ModuleNotFound\",\n            Self::Alloc(_) => \"OutOfMemory\",\n        }\n    }\n}","sourceCodeStart":1,"sourceCodeEnd":23,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/ast/error.rs#L1-L23","documentation":"Error \"SyntaxError\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at src/ast/error.rs:5 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}