DIYgod/RSSHub · error · ConfigNotFoundError

Ehentai favorites RSS is disabled due to the lack of <a href

Error message

Ehentai favorites RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>

What it means

Thrown as a `ConfigNotFoundError` when the Ehentai/E-Hentai API module (`EhAPI`) does not have a session cookie configured. The favorites route requires authentication to access a user's private favorites list, which is impossible without the `ipb_member_id` and `ipb_pass_hash` cookies. RSSHub maps ConfigNotFoundError to an HTTP 501-style response indicating a server-side configuration gap, not a user input error.

Source

Thrown at lib/routes/ehentai/favorites.ts:33

        routeParams: 'Additional parameters, see the table above',
    },
    features: {
        requireConfig: false,
        requirePuppeteer: false,
        antiCrawler: true,
        supportBT: true,
        supportPodcast: false,
        supportScihub: false,
        nsfw: true,
    },
    name: 'Favorites',
    maintainers: ['yindaheng98', 'syrinka'],
    handler,
};

async function handler(ctx) {
    if (!EhAPI.has_cookie) {
        throw new ConfigNotFoundError('Ehentai favorites RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
    }
    const favcat = ctx.req.param('favcat') ? Number.parseInt(ctx.req.param('favcat')) : 0;
    const page = ctx.req.param('page');
    const routeParams = new URLSearchParams(ctx.req.param('routeParams'));
    const bittorrent = routeParams.get('bittorrent') || false;
    const embed_thumb = routeParams.get('embed_thumb') || false;
    const inline_set = ctx.req.param('order') === 'posted' ? 'fs_p' : 'fs_f';
    const items = await EhAPI.getFavoritesItems(cache, favcat, inline_set, page, bittorrent as unknown as boolean, embed_thumb as unknown as boolean);

    return EhAPI.from_ex
        ? {
              title: 'ExHentai Favorites',
              link: `https://exhentai.org/favorites.php?favcat=${favcat}&inline_set=${inline_set}`,
              item: items,
          }
        : {
              title: 'E-Hentai Favorites',
              link: `https://e-hentai.org/favorites.php?favcat=${favcat}&inline_set=${inline_set}`,

View on GitHub (pinned to bed535e087)

Solutions

  1. Set the `EHENTAI_COOKIE` environment variable with the `ipb_member_id` and `ipb_pass_hash` cookie values from your logged-in E-Hentai or ExHentai session.
  2. For ExHentai access, also ensure the `ipb_member_id` and `ipb_pass_hash` are valid — ExHentai rejects sessions without them with a blank page (sad panda).
  3. Restart RSSHub after setting the environment variable so the config is reloaded.
  4. If you are the end user (not the hoster), contact the instance operator to configure the cookie, or self-host.
Defensive patterns

Strategy: validation

Validate before calling

// Check if the cookie is configured before invoking the route
import EhAPI from './ehapi';

function ensureEhentaiConfigured(): void {
    if (!EhAPI.has_cookie) {
        throw new ConfigNotFoundError('Set EHENTAI_COOKIE env var with ipb_member_id and ipb_pass_hash');
    }
}

Type guard

// Verify the cookie flag at startup or before use
function isEhentaiConfigured(): boolean {
    return EhAPI.has_cookie === true;
}

Prevention

When it happens

Trigger: The RSSHub deployment was started without setting the `EHENTAI_COOKIE` (or equivalent) environment variable. The `EhAPI.has_cookie` flag is false at startup because no cookie string was provided in the config. Every request to `/ehentai/favorites/...` triggers this error.

Common situations: Self-hosted RSSHub instance where the operator forgot to configure the Ehentai cookie env vars. The cookie expired and the config still has the old value (though in that case has_cookie would be true but requests would fail differently). The deployment uses a Docker image where the env var was not passed through.

Related errors


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