{"record":{"id":"6e7afc574140627f","repo":"DIYgod/RSSHub","slug":"this-user-has-no-articles","errorCode":null,"errorMessage":"This user has no articles.","messagePattern":"This user has no articles\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"lib/routes/civitai/user.ts","lineNumber":56,"sourceCode":"            input: JSON.stringify({\n                json: {\n                    period: 'AllTime',\n                    periodMode: 'published',\n                    sort: 'Newest',\n                    username,\n                    includeDrafts: false,\n                    pending: true,\n                    browsingLevel: 1,\n                    excludedTagIds: [415792, 426772, 5188, 5249, 130818, 130820, 133182],\n                    cursor: null,\n                },\n                meta: { values: { cursor: ['undefined'] } },\n            }),\n        },\n    });\n\n    if (!article.result.data.json.items.length) {\n        throw new Error('This user has no articles.');\n    }\n\n    const list = article.result.data.json.items.map((item) => ({\n        title: item.title,\n        link: `https://civitai.com/articles/${item.id}`,\n        id: item.id,\n        pubDate: parseDate(item.publishedAt),\n        updated: parseDate(item.publishedAt),\n        author: item.user?.username,\n        category: item.tags.map((tag) => tag.name),\n        image: `https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/${item.coverImage.url}/${item.coverImage.name}`,\n    }));\n\n    const items = await Promise.all(\n        list.map((item) =>\n            cache.tryGet(item.link, async () => {\n                const response = await ofetch('https://civitai.com/api/trpc/article.getById', {\n                    query: {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/civitai/user.ts#L38-L74","documentation":"Thrown by the Civitai user-articles route when a GraphQL/Relay-style POST to civitai.com returns `article.result.data.json.items` as an empty array. This means the user account exists (the request did not error) but has published zero articles. Plain `Error`.","triggerScenarios":"Requesting `/civitai/user/<username>` where the user has no articles; the user only has models/images but no articles; the GraphQL filter combination (excludedTagIds, browsingLevel) filters out all of the user's articles.","commonSituations":"Artist who posts models but never writes articles; new account; NSFW articles all excluded by the hardcoded `excludedTagIds` / `browsingLevel: 1` filter.","solutions":["Verify the user has articles on civitai.com/users/<username>/articles.","If the user's articles are all NSFW, note the route applies `browsingLevel: 1` and a fixed `excludedTagIds` list — those may hide legitimate content; raise the level or trim the exclusion list in code.","Treat empty result as 'feed legitimately empty' rather than an error — consider returning an empty feed instead of throwing."],"exampleFix":"// before\nif (!article.result.data.json.items.length) {\n    throw new Error('This user has no articles.');\n}\n// after — return empty feed instead of erroring\nconst list = article.result.data.json.items.map(...);\n// (omit the throw; let RSSHub surface an empty feed)","handlingStrategy":"validation","validationCode":"const items = article.result?.data?.json?.items ?? [];\nif (items.length === 0) {\n    // return an empty feed instead of throwing\n}","typeGuard":"function hasArticles(r: unknown): r is { result: { data: { json: { items: unknown[] } } } } {\n    return Boolean((r as any)?.result?.data?.json?.items?.length);\n}","tryCatchPattern":null,"preventionTips":["Verify the user has articles on civitai.com/users/<name>/articles.","Remember the route forces `browsingLevel: 1` and a fixed `excludedTagIds` list — these may hide content.","Consider returning an empty feed rather than throwing for legitimately-empty accounts."],"tags":["validation","response-shape","graphql","empty-result"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}