DIYgod/RSSHub · warning · InvalidParameterError
unknown site: ${site}
Error message
unknown site: ${site} What it means
Thrown by the Bugzilla aggregator route when the `site` path parameter is not a key in the `INSTANCES` map. The map enumerates six supported Bugzilla deployments (apache, apache.ooo, apache.SpamAssassin, kernel, mozilla, webkit). Unlike most peers, this route correctly uses `InvalidParameterError`, which RSSHub translates into an HTTP 400 with a readable message.
Source
Thrown at lib/routes/bugzilla/bug.ts:21
import InvalidParameterError from '@/errors/types/invalid-parameter';
import type { Data, DataItem, Route } from '@/types';
import ofetch from '@/utils/ofetch';
import { parseDate } from '@/utils/parse-date';
const INSTANCES = new Map([
['apache', 'bz.apache.org/bugzilla'],
['apache.ooo', 'bz.apache.org/ooo'], // Apache OpenOffice
['apache.SpamAssassin', 'bz.apache.org/SpamAssassin'],
['kernel', 'bugzilla.kernel.org'],
['mozilla', 'bugzilla.mozilla.org'],
['webkit', 'bugs.webkit.org'],
]);
async function handler(ctx: Context): Promise<Data> {
const { site, bugId } = ctx.req.param();
if (!INSTANCES.has(site)) {
throw new InvalidParameterError(`unknown site: ${site}`);
}
const link = `https://${INSTANCES.get(site)}/show_bug.cgi?id=${bugId}`;
const xml = await ofetch(`${link}&ctype=xml`);
const $ = load(xml);
const items = $('long_desc').map((index, rawItem) => {
const $ = load(rawItem, null, false);
return {
title: `comment #${$('commentid').text()}`,
link: `${link}#c${index}`,
description: $('thetext').text(),
pubDate: parseDate($('bug_when').text()),
author: $('who').attr('name'),
} as DataItem;
});
return { title: $('short_desc').text(), link, item: items.toArray() };
}
function markdownFrom(instances: Map<string, string>, separator: string = ', '): string {View on GitHub (pinned to bed535e087)
Solutions
- Use one of the six supported keys: apache, apache.ooo, apache.SpamAssassin, kernel, mozilla, webkit.
- Note keys are case-sensitive; use the exact lowercase (except the mixed-case apache.SpamAssassin / apache.ooo compound keys).
- To extend support, add the instance hostname to the `INSTANCES` map in lib/routes/bugzilla/bug.ts.
Example fix
// before /bugzilla/redhat/12345 // after /bugzilla/mozilla/12345
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = new Set(['apache', 'apache.ooo', 'apache.SpamAssassin', 'kernel', 'mozilla', 'webkit']);
if (!SUPPORTED.has(site)) {
// do not call the route; surface a client-side error
} Type guard
const BUGZILLA_SITES = ['apache', 'apache.ooo', 'apache.SpamAssassin', 'kernel', 'mozilla', 'webkit'] as const;
type BugzillaSite = typeof BUGZILLA_SITES[number];
function isBugzillaSite(s: string): s is BugzillaSite {
return (BUGZILLA_SITES as readonly string[]).includes(s);
} Prevention
- Treat the supported-site list as versioned; re-check after upgrading RSSHub.
- Remember compound keys (apache.ooo, apache.SpamAssassin) are case-sensitive.
- Request additions to the INSTANCES map rather than passing unsupported hosts.
When it happens
Trigger: Calling `/bugzilla/<unknown-site>/<bugId>` where `<unknown-site>` is not one of apache, apache.ooo, apache.SpamAssassin, kernel, mozilla, webkit. Misspellings like `mozila`, `apche`, or unsupported trackers like `gnome`, `freedesktop`, `redhat`.
Common situations: User assumes their favourite Bugzilla is supported, copy-paste from a docs page that predates the supported-list, or case sensitivity ('Apache' vs 'apache').
Related errors
- Bad category. See <a href="https://docs.rsshub.app/routes/fi
- Invalid type parameter
- Invalid type parameter
- Invalid category: ${category}
- Invalid column
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/cbc22db532a2fe52.
Report an issue: GitHub.