DIYgod/RSSHub · error · InvalidParameterError

Unexpected status, please open an issue.

Error message

Unexpected status, please open an issue.

What it means

An `InvalidParameterError` at lib/routes/uptimerobot/rss.tsx:130 when the status capture group from the title regex is neither 'UP' nor 'DOWN'. The if/else-if/else chain only handles those two strings; any other value (e.g. 'PAUSED', 'SEEMS_DOWN', 'PENDING') falls through to the throw. This indicates UptimeRobot introduced a new monitor state in their RSS feed.

Source

Thrown at lib/routes/uptimerobot/rss.tsx:130

        }

        // id could be a URL, a domain, an IP address, or a hex string. fix it
        let link;
        try {
            link = !id.startsWith('http') && id.includes('.') ? new URL(`http://${id}`).href : new URL(id).href;
        } catch {
            // ignore
        }

        const duration = item['details:duration'];
        const monitor = (monitors[monitorName] ||= new Monitor(monitorName));

        if (status === 'UP') {
            monitor.up(duration);
        } else if (status === 'DOWN') {
            monitor.down(duration);
        } else {
            throw new InvalidParameterError('Unexpected status, please open an issue.');
        }

        const desc = renderToString(
            <>
                Already {status} for {formatTime(duration)}
                <br />
                <br />
                {showID && id ? (
                    <>
                        Monitor ID:{' '}
                        {link ? (
                            <a href={link} target="_blank">
                                {id}
                            </a>
                        ) : (
                            id
                        )}
                        <br />

View on GitHub (pinned to bed535e087)

Solutions

  1. Inspect the live RSS feed to find the new status string in the title.
  2. Add the new status to the if/else chain (e.g. `else if (status === 'PAUSED') { monitor.up(duration); }`) or add a no-op branch.
  3. Alternatively, treat any non-'DOWN' status as up.

Example fix

// before
if (status === 'UP') {
    monitor.up(duration);
} else if (status === 'DOWN') {
    monitor.down(duration);
} else {
    throw new InvalidParameterError('Unexpected status, please open an issue.');
}

// after
if (status === 'UP') {
    monitor.up(duration);
} else if (status === 'DOWN') {
    monitor.down(duration);
} else if (status === 'PAUSED' || status === 'SEEMS_DOWN') {
    // known non-fatal states: do not affect uptime/downtime counters
} else {
    throw new InvalidParameterError('Unexpected status, please open an issue.');
}
Defensive patterns

Strategy: fallback

Validate before calling

const KNOWN_STATUSES = ['UP', 'DOWN', 'PAUSED', 'SEEMS_DOWN', 'PENDING'];
const isKnownStatus = (status: string): boolean => KNOWN_STATUSES.includes(status);

Type guard

const isHandledStatus = (s: string): s is 'UP' | 'DOWN' => s === 'UP' || s === 'DOWN';

Try / catch

try {
    const items = parseUptimeRobotRss(rss);
} catch (e) {
    if (e instanceof InvalidParameterError && e.message.includes('Unexpected status')) {
        // new UptimeRobot status value — add it to the if/else chain
        console.error('UptimeRobot RSS contains an unhandled status value');
    }
    throw e;
}

Prevention

When it happens

Trigger: UptimeRobot adds 'PAUSED' or 'SEEMS_DOWN' as a status that appears in the RSS title; a monitor is in a transitional state that emits a status string the route doesn't enumerate.

Common situations: UptimeRobot product update adds new statuses; monitor manually paused producing 'PAUSED' in the feed.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/bc2d47b6ce460cfa. Report an issue: GitHub.