{"record":{"id":"bc319f5a4d4840e9","repo":"biomejs/biome","slug":"to-have-a-utf-8-path","errorCode":null,"errorMessage":"To have a UTF-8 path","messagePattern":"To have a UTF-8 path","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/biome_lsp/src/session.rs","lineNumber":904,"sourceCode":"        } else {\n            *workspace_folders = Some(added);\n        }\n    }\n\n    /// Returns the root URI of the workspace as provided by the client\n    pub(crate) fn base_uri(&self) -> Option<Uri> {\n        let initialize_params = self.initialize_params.get()?;\n        initialize_params.root_uri.clone()\n    }\n\n    /// Returns the base path of the workspace on the filesystem if it has one\n    pub(crate) fn base_path(&self) -> Option<Utf8PathBuf> {\n        let initialize_params = self.initialize_params.get()?;\n\n        let root_uri = initialize_params.root_uri.as_ref()?;\n        match root_uri.to_file_path() {\n            Some(base_path) => Some(\n                Utf8PathBuf::from_path_buf(base_path.to_path_buf()).expect(\"To have a UTF-8 path\"),\n            ),\n            None => {\n                error!(\n                    \"The Workspace root URI {root_uri:?} could not be parsed as a filesystem path\"\n                );\n                None\n            }\n        }\n    }\n\n    /// Returns a reference to the client information for this session\n    pub(crate) fn client_information(&self) -> Option<&ClientInformation> {\n        self.initialize_params.get()?.client_information.as_ref()\n    }\n\n    /// Mark that the initialized() notification has been received\n    pub(crate) fn set_initialized(&self) {\n        self.initialized.store(true, Ordering::Relaxed);","sourceCodeStart":886,"sourceCodeEnd":922,"githubUrl":"https://github.com/biomejs/biome/blob/0fca643d22845c28e0e0b7375013155e3f80717f/crates/biome_lsp/src/session.rs#L886-L922","documentation":"Error \"To have a UTF-8 path\" thrown in biomejs/biome.","triggerScenarios":"Thrown at crates/biome_lsp/src/session.rs:903 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the URI received by the LSP server maps to a valid UTF-8 file path.","Reject or normalize non-UTF-8 document URIs at the session boundary."],"exampleFix":"let path = url_to_path(&uri).ok_or_else(|| /* invalid URI error */)?;","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0fca643d22845c28e0e0b7375013155e3f80717f","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}