{"record":{"id":"4a72182c8c273f66","repo":"astral-sh/ruff","slug":"vendored-file-not-found-path-err","errorCode":null,"errorMessage":"Vendored file not found: {path}: {err}","messagePattern":"Vendored file not found: (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/ty_wasm/src/lib.rs","lineNumber":819,"sourceCode":"                range: Range::from_file_range(\n                    &self.db,\n                    target.file_range(),\n                    self.position_encoding,\n                ),\n                kind: target.kind().into(),\n            })\n            .collect())\n    }\n\n    /// Gets a file handle for a vendored file by its path.\n    /// This allows vendored files to participate in LSP features like hover, completions, etc.\n    #[wasm_bindgen(js_name = \"getVendoredFile\")]\n    pub fn get_vendored_file(&self, path: &str) -> Result<FileHandle, Error> {\n        let vendored_path = VendoredPath::new(path);\n\n        // Try to get the vendored file as a File\n        let file = vendored_path_to_file(&self.db, vendored_path)\n            .map_err(|err| Error::new(&format!(\"Vendored file not found: {path}: {err}\")))?;\n\n        Ok(FileHandle {\n            file,\n            path: vendored_path.to_path_buf().into(),\n        })\n    }\n}\n\npub(crate) fn into_error<E: std::fmt::Display>(err: E) -> Error {\n    Error::new(&err.to_string())\n}\n\nfn map_targets_to_links(\n    db: &dyn Db,\n    targets: RangedValue<NavigationTargets>,\n    source: &SourceText,\n    index: &LineIndex,\n    position_encoding: PositionEncoding,","sourceCodeStart":801,"sourceCodeEnd":837,"githubUrl":"https://github.com/astral-sh/ruff/blob/26f38c119cac42e4d320ba08f09224fdec74af2c/crates/ty_wasm/src/lib.rs#L801-L837","documentation":"A wasm-bindgen Error from ty's getVendoredFile binding: constructing or resolving the vendored path failed, with the underlying error appended. Vendored files (e.g. bundled typeshed) are addressed by relative paths, and the given path could not be resolved to one.","triggerScenarios":"Thrown at crates/ty_wasm/src/lib.rs:819 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid vendored path relative to the vendored root","Inspect the appended underlying error for the concrete cause"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f38c119cac42e4d320ba08f09224fdec74af2c","analyzedAt":"2026-09-05T10:32:37.492Z","contentChangedAt":"2026-09-05T10:32:37.492Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}