DIYgod/RSSHub · error · ConfigNotFoundError

ff14risingstones RSS is disabled due to the lack of relevant

Error message

ff14risingstones RSS is disabled due to the lack of relevant config

What it means

A ConfigNotFoundError from checkConfig() when the ff14risingstones route is requested but the deployment lacks either the ff14risingstones session cookie (config.sdo.ff14risingstones) or the required User-Agent (config.sdo.ua). Both are needed to authenticate the cookie-gated SDO API, so the route is disabled entirely rather than failing mid-request.

Source

Thrown at lib/routes/sdo/ff14risingstones/utils.tsx:115

const renderRolePlayParty = ({ cover_pic, open_time, rp_type, create_time, area, address, custom_label, profile, detail_mask }) =>
    renderToString(
        <>
            {cover_pic ? <img src={cover_pic} /> : null}
            <p>开放时间:{open_time}</p>
            <p>RP 类型:{rp_type}</p>
            <p>创立时间:{create_time}</p>
            <p>区服:{area}</p>
            <p>地址:{address}</p>
            <p>标签:{custom_label}</p>
            <p>简介:{profile}</p>
            <div>{detail_mask ? raw(detail_mask) : null}</div>
        </>
    );

export function checkConfig() {
    if (!config.sdo.ff14risingstones || !config.sdo.ua) {
        throw new ConfigNotFoundError('ff14risingstones RSS is disabled due to the lack of relevant config');
    }
}

export function request(url: string, options?: RequestInit) {
    return ofetch(url, {
        ...options,
        headers: {
            Cookie: `ff14risingstones=${config.sdo.ff14risingstones}`,
            'User-Agent': config.sdo.ua!,
            ...options?.headers,
        },
    });
}

export async function requestAPI<T = any>(url: string, options?: RequestInit) {
    const response = (await request(url, options)) as BaseResponse<T>;

    if (response.code !== 10000) {

View on GitHub (pinned to bed535e087)

Solutions

  1. Set SDO_FF14RISINGSTONES (the ff14risingstones cookie value) and SDO_UA (a browser User-Agent) in the RSSHub environment and restart.
  2. Refresh the ff14risingstones cookie by logging in at the SDO site and copying the current cookie value (these expire periodically).
  3. Confirm both keys load under config.sdo.* via the config loader namespace.

Example fix

// before
export function checkConfig() {
    if (!config.sdo.ff14risingstones || !config.sdo.ua) {
        throw new ConfigNotFoundError('ff14risingstones RSS is disabled due to the lack of relevant config');
    }
}

// after — no code change; fix is environment-side:
// .env
// SDO_FF14RISINGSTONES=<cookie value>
// SDO_UA=Mozilla/5.0 ...
Defensive patterns

Strategy: validation

Validate before calling

// Surface a readiness check at startup so operators know the feature is off.
function ff14ConfigReady(): boolean {
    return Boolean(config.sdo?.ff14risingstones && config.sdo?.ua);
}
if (!ff14ConfigReady()) {
    // return a clear 'feature disabled' notice instead of letting the route throw at request time
}

Type guard

const hasFf14Config = (c: typeof config): c is typeof config & { sdo: { ff14risingstones: string; ua: string } } =>
    Boolean(c.sdo?.ff14risingstones && c.sdo?.ua);

Try / catch

import ConfigNotFoundError from '@/errors/types/config-not-found';
try {
    checkConfig();
} catch (e) {
    if (e instanceof ConfigNotFoundError) {
        return ctx.json({ error: 'ff14risingstones route is disabled: set SDO_FF14RISINGSTONES and SDO_UA.' }, 503);
    }
    throw e;
}

Prevention

When it happens

Trigger: checkConfig() is called at the start of an ff14risingstones handler and `!config.sdo.ff14risingstones || !config.sdo.ua` is true — i.e. one or both env values (SDO_FF14RISINGSTONES, SDO_UA) are unset.

Common situations: Self-hosted RSSHub without SDO_* env vars configured; the session cookie expired and was cleared (but ua remains); config.sdo is undefined because the namespace was never registered.

Related errors


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