{"record":{"id":"501a36afc2b6792c","repo":"DIYgod/RSSHub","slug":"no-uid-found-for-username-username","errorCode":null,"errorMessage":"No UID found for username: ${username}","messagePattern":"No UID found for username: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/voronoiapp/author.ts","lineNumber":38,"sourceCode":"    },\n    handler: async (ctx) => {\n        const { username } = ctx.req.param();\n        const uid = await getUidFromUsername(username);\n        const items = await getPostItems({ order: 'DESC', author: uid });\n        return {\n            ...CommonDataProperties,\n            title: `Voronoi Posts by ${username}`,\n            link: `https://www.voronoiapp.com/author/${username}`,\n            item: items,\n        } as Data;\n    },\n};\nasync function getUidFromUsername(username: string): Promise<string> {\n    return (await cache.tryGet(`voronoiapp-author-${username}`, async () => {\n        const response = await ofetch<'text'>(`https://www.voronoiapp.com/author/${username}`);\n        const match = response.match(/\\\\\"uid\\\\\":\\\\\"([\\w-]+)\\\\\"/);\n        if (!match) {\n            throw new Error(`No UID found for username: ${username}`);\n        }\n        return match[1];\n    })) as string;\n}\n","sourceCodeStart":20,"sourceCodeEnd":43,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/voronoiapp/author.ts#L20-L43","documentation":"Thrown by the Voronoi app author route when the scraped author page HTML does not contain a UID matching the regex pattern `\\\\\"uid\\\\\":\\\\\"([\\w-]+)\\\\\"`. The route fetches the public author page (`https://www.voronoiapp.com/author/:username`), then extracts the internal UID from an inline JSON blob in the page source. If the username doesn't exist or the page structure changed, the regex fails. The result is cached under `voronoiapp-author-${username}`.","triggerScenarios":"A request to `/voronoiapp/author/:username` where the username does not correspond to a real Voronoi author page, or the author page HTML structure has changed so the UID regex no longer matches. This can also happen if the page returns an error/spinner instead of the author profile HTML.","commonSituations":"Nonexistent or misspelled username; the Voronoi website updated its page template and the inline JSON key `uid` was renamed or restructured; or the page loaded a client-side-rendered shell without the embedded JSON (SSR failure).","solutions":["Verify the username exists by visiting `https://www.voronoiapp.com/author/:username` in a browser and checking for a valid profile page.","If the username is valid but the error persists, the page template may have changed — check if the `uid` field is still present in the page source.","Clear the cached value by restarting the RSSHub instance or flushing the `voronoiapp-author-*` cache keys if the page structure was temporarily broken."],"exampleFix":"// before: regex assumes escaped JSON in HTML\nconst match = response.match(/\\\"uid\\\":\\\"([\\w-]+)\\\"/);\n// after: also try unescaped JSON\nconst match = response.match(/(?:\\\\\"uid\\\\\"|\"uid\"): ?(?:\\\\\"|\")([\\w-]+)(?:\\\\\"|\")/);\nif (!match) {\n    throw new InvalidParameterError(`No UID found for username: ${username}`);\n}","handlingStrategy":"try-catch","validationCode":"// Pre-validate that the author page exists and contains a UID\nasync function authorExists(username: string): Promise<boolean> {\n    try {\n        const resp = await ofetch<string>(`https://www.voronoiapp.com/author/${username}`);\n        return /(?:\\\\\"uid\\\"|\"uid\"): ?(?:\\\\\"|\")([\\w-]+)/.test(resp);\n    } catch {\n        return false;\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    const uid = await getUidFromUsername(username);\n} catch (e) {\n    if (e.message.startsWith('No UID found')) {\n        throw new InvalidParameterError(`Author '${username}' not found on Voronoi`);\n    }\n    throw e;\n}","preventionTips":["Use InvalidParameterError for user-facing failures rather than generic Error.","Make the regex resilient to both escaped (\\\\\") and unescaped (\") JSON in HTML.","Cache negative results briefly to avoid repeated expensive scrapes for nonexistent authors.","Consider using a JSON API endpoint instead of scraping HTML when one is available."],"tags":["web-scraping","regex-extraction","voronoiapp","rss-route","fragile-selector"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}