{"record":{"id":"83a085ad7814853f","repo":"jackwener/OpenCLI","slug":"dblp-author-search-for-name-returned-a-hit-wi","errorCode":null,"errorMessage":"dblp author search for \"${name}\" returned a hit without a PID URL","messagePattern":"dblp author search for \"(.+?)\" returned a hit without a PID URL","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/dblp/author.js","lineNumber":102,"sourceCode":"        }\n        else {\n            const name = requireQuery(args.author, 'author');\n            const json = await dblpFetchJson(\n                `/search/author/api?q=${encodeURIComponent(name)}&format=json&h=20`,\n                'dblp author search',\n            );\n            const raw = json?.result?.hits?.hit;\n            const hits = Array.isArray(raw) ? raw : (raw ? [raw] : []);\n            if (!hits.length) {\n                throw new EmptyResultError(\n                    'dblp author',\n                    `No dblp author matched \"${name}\". Try a different spelling, or pass --pid to bypass author search.`,\n                );\n            }\n            const top = pickTopAuthor(hits);\n            pid = extractPidFromAuthorHit(top);\n            if (!pid) {\n                throw new CommandExecutionError(\n                    `dblp author search for \"${name}\" returned a hit without a PID URL`,\n                    'dblp may have changed its author-search response shape; retry or pass --pid manually.',\n                );\n            }\n            resolvedName = decodeXmlEntities(String(top?.info?.author ?? '')).trim();\n        }\n        const xml = await dblpFetchXml(`/pid/${pid}.xml`, `dblp pid ${pid}`);\n        const records = splitRecords(xml);\n        if (!records.length) {\n            throw new EmptyResultError(\n                'dblp author',\n                `dblp PID ${pid}${resolvedName ? ` (${resolvedName})` : ''} has no publications.`,\n            );\n        }\n        return records.slice(0, limit).map((recordXml, i) => {\n            const row = recordXmlToRow(`<root>${recordXml}</root>`);\n            return {\n                rank: i + 1,","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/dblp/author.js#L84-L120","documentation":"CommandExecutionError thrown when dblp's author search returns at least one hit, but the top hit's info contains no PID URL that extractPidFromAuthorHit can parse. The library treats this as an unexpected response-shape change rather than empty data.","triggerScenarios":"dblp /search/author/api returns a hit whose info object lacks the expected 'url' field containing '/pid/xx/nnn' — e.g. malformed/degraded API responses, or dblp changing the JSON schema of author hits.","commonSituations":"dblp API schema change after an update; hits that are non-author entities or partial records; transient dblp API issues returning incomplete JSON.","solutions":["Retry the search — could be a transient malformed response","Run the same search URL (https://dblp.org/search/author/api?q=<name>&format=json) in a browser to inspect the shape","Pass --pid directly with the author's PID to skip author search","Update the CLI in case a newer version handles the new response shape"],"exampleFix":"// before\nopencli dblp author --name 'Yoshua Bengio'\n// Error: dblp author search for \"Yoshua Bengio\" returned a hit without a PID URL\n// after\nopencli dblp author --pid 97/3192","handlingStrategy":"retry","validationCode":"// No client-side validation can prevent an upstream schema change; retry on failure.\nconst result = await withRetry(() => dblpAuthor({ name }), 2);","typeGuard":"function hitHasPid(hit) {\n  const url = hit?.info?.url;\n  return typeof url === 'string' && /\\/pid\\/[a-z]+\\/\\d+/.test(url);\n}","tryCatchPattern":"try {\n  rows = await dblpAuthor({ name });\n} catch (err) {\n  if (/hit without a PID URL/.test(err.message)) {\n    // fall back to manual PID\n    rows = await dblpAuthor({ pid: KNOWN_PID });\n  } else throw err;\n}","preventionTips":["Keep a known-good PID fallback for critical authors","Subscribe to/watch dblp API changes if you depend on it heavily","Wrap author search in a retry with short backoff","Periodically smoke-test the dblp search endpoint shape in CI"],"tags":["dblp","schema-change","api-response"],"backgroundTag":"api-response-schema-change","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}