{"record":{"id":"9808a89490c668a9","repo":"DIYgod/RSSHub","slug":"tag-not-found","errorCode":null,"errorMessage":"Tag not found","messagePattern":"Tag not found","errorType":"exception","errorClass":"Error","httpStatus":503,"severity":"error","filePath":"lib/routes/8kcos/utils.ts","lineNumber":55,"sourceCode":"        }\n        return {\n            id: categoryInfo.id,\n            title: categoryInfo.yoast_head_json.title,\n            description: categoryInfo.description,\n            link: categoryInfo.link,\n        };\n    });\n\nexport const getTagInfo = (tag: string) =>\n    cache.tryGet(`8kcosplay:tag:${tag}`, async () => {\n        const data = await ofetch('https://www.8kcosplay.com/wp-json/wp/v2/tags', {\n            query: {\n                slug: tag,\n            },\n        });\n        const tagInfo = data[0];\n        if (!tagInfo) {\n            throw new Error('Tag not found');\n        }\n        return {\n            id: tagInfo.id,\n            title: tagInfo.yoast_head_json.title,\n            description: tagInfo.description,\n        };\n    });\n","sourceCodeStart":37,"sourceCodeEnd":63,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/8kcos/utils.ts#L37-L63","documentation":"8kcosplay tag lookup queries /wp-json/wp/v2/tags?slug=… and throws a plain `Error('Tag not found')` when WP returns no matches. Result is cached under '8kcosplay:tag:<slug>'.","triggerScenarios":"Calling the 8kcos tag feed with a slug that does not exist on 8kcosplay.com — typo, renamed tag, or using an ID instead of the slug.","commonSituations":"Tag renamed in WP admin; cache replaying a previous bad lookup; multi-word tag slug misunderstood (WP joins with '-').","solutions":["Verify the slug at https://www.8kcosplay.com/wp-json/wp/v2/tags?slug=<your-slug>.","Invalidate the cache key '8kcosplay:tag:<slug>'.","Use the exact lowercase, dash-joined slug from the WP term."],"exampleFix":"// before\ntag: 'Long Skirt'         // spaces, wrong form\n// after\ntag: 'long-skirt'","handlingStrategy":"try-catch","validationCode":"function looksLikeWpTagSlug(s) {\n  return typeof s === 'string' && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(s);\n}","typeGuard":"function isWpTagSlug(s): s is string {\n  return typeof s === 'string' && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(s);\n}","tryCatchPattern":"try {\n  return await getTagInfo(tag);\n} catch (e) {\n  if (e instanceof Error && /Tag not found/.test(e.message)) {\n    return null;\n  }\n  throw e;\n}","preventionTips":["Multi-word tags use a dash joiner in WP slugs.","Invalidate '8kcosplay:tag:<slug>' after a correction.","Match on the message text — the error class is plain Error, not InvalidParameterError."],"tags":["upstream-dependent","wordpress","cache","rsshub","error-class-mismatch"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}