{"record":{"id":"97e97da5f15a5644","repo":"openai/codex","slug":"invalid-uri-0","errorCode":null,"errorMessage":"invalid URI: {0}","messagePattern":"invalid URI: (.+?)","errorType":"exception","errorClass":"PathUriParseError","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/path-uri/src/lib.rs","lineNumber":882,"sourceCode":"\n/// Applies the common URI checks plus `file:` path-byte restrictions.\nfn validate_file_url(url: &Url) -> Result<(), PathUriParseError> {\n    validate_common_known_uri(url)?;\n    // `Url` accepts `%00`, but native path APIs use null as a terminator and\n    // `Url::to_file_path` cannot represent a decoded null byte.\n    if urlencoding::decode_binary(url.path().as_bytes()).contains(&0)\n        && decode_bad_path_uri(url).is_none()\n    {\n        return Err(PathUriParseError::InvalidFileUriPath {\n            path: url.to_string(),\n        });\n    }\n    Ok(())\n}\n\n#[derive(Debug, Error, PartialEq, Eq)]\npub enum PathUriParseError {\n    #[error(\"invalid URI: {0}\")]\n    InvalidUri(#[from] url::ParseError),\n    #[error(\"unsupported path URI scheme `{0}`\")]\n    UnsupportedScheme(String),\n    #[error(\"'{path}' is invalid on '{os}'\", os = std::env::consts::OS)]\n    InvalidFileUriPath { path: String },\n    #[error(\"credentials are not allowed in path URIs\")]\n    CredentialsNotAllowed,\n    #[error(\"ports are not allowed in path URIs\")]\n    PortNotAllowed,\n    #[error(\"query parameters are not allowed in path URIs\")]\n    QueryNotAllowed,\n    #[error(\"fragments are not allowed in path URIs\")]\n    FragmentNotAllowed,\n    #[error(\"path `{0}` must be relative when joining a path URI\")]\n    JoinPathMustBeRelative(String),\n}\n\n/// Path syntax used to render a [`PathUri`] as an operating-system path.","sourceCodeStart":864,"sourceCodeEnd":900,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/path-uri/src/lib.rs#L864-L900","documentation":"Error \"invalid URI: {0}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/utils/path-uri/src/lib.rs:882 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":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}