{"record":{"id":"e66143fc7390dd8d","repo":"astral-sh/uv","slug":"invalid-gist-url-format","errorCode":null,"errorMessage":"Invalid Gist URL format","messagePattern":"Invalid Gist URL format","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/project/run.rs","lineNumber":1928,"sourceCode":"            }\n            Self::Empty => {\n                write!(f, \"python\")?;\n                Ok(())\n            }\n        }\n    }\n}\n\n/// Resolve a GitHub Gist URL to its raw file URL using the GitHub API.\nasync fn resolve_gist_url(\n    url: &DisplaySafeUrl,\n    client_builder: &BaseClientBuilder<'_>,\n) -> anyhow::Result<DisplaySafeUrl> {\n    // Extract the Gist ID from the URL.\n    let gist_id = url\n        .path_segments()\n        .and_then(|mut segments| segments.nth(1))\n        .ok_or_else(|| anyhow!(\"Invalid Gist URL format\"))?;\n\n    // Build the API URL.\n    let api_url = format!(\"https://api.github.com/gists/{gist_id}\");\n\n    let client = client_builder.build()?;\n\n    // Build the request with appropriate headers.\n    let api_url_parsed = DisplaySafeUrl::parse(&api_url)?;\n    let mut request = client\n        .for_host(&api_url_parsed)\n        .get(Url::from(api_url_parsed));\n    request = request.header(\"Accept\", \"application/vnd.github.v3+json\");\n\n    // Add GitHub token, if available.\n    if let Ok(token) = std::env::var(EnvVars::UV_GITHUB_TOKEN) {\n        request = request.header(\"Authorization\", format!(\"Bearer {token}\"));\n    }\n","sourceCodeStart":1910,"sourceCodeEnd":1946,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/project/run.rs#L1910-L1946","documentation":"Error \"Invalid Gist URL format\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/project/run.rs:1928 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":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}