DIYgod/RSSHub · error · Error

Failed to retrieve user follows from MangaDex API.

Error message

Failed to retrieve user follows from MangaDex API.

What it means

Thrown when GET /user/follows/manga-feed (the logged-in user's followed-manga chapter feed) returns no data.data. Cached under mangadex:user-follows for routeExpire. Requires a Bearer access token, so this is fundamentally an authenticated endpoint.

Source

Thrown at lib/routes/mangadex/user/feed.ts:97

            const response = await got.get(
                `${userFollowUrl}${toQueryString({
                    translatedLanguage: languagesQuery,
                    order: {
                        publishAt: 'desc',
                    },
                    limit,
                })}`,
                {
                    headers: {
                        Authorization: `Bearer ${accessToken}`,
                        'User-Agent': config.trueUA,
                    },
                }
            );

            const followedChapterFeed = response?.data?.data;
            if (!followedChapterFeed) {
                throw new Error('Failed to retrieve user follows from MangaDex API.');
            }

            return followedChapterFeed;
        },
        config.cache.routeExpire,
        false
    )) as Array<Record<string, any>>;

    const mangaIds = feed.map((chapter) => chapter?.relationships.find((relationship) => relationship.type === 'manga')?.id);

    const mangaMetas = await getMangaMetaByIds(mangaIds);

    return {
        title: 'User Follows',
        link: 'https://mangadex.org/titles/feed',
        description: 'The latest updates of all the manga you follow on MangaDex.',
        item: feed.map((chapter) => {
            const mangaId = chapter.relationships.find((relationship) => relationship.type === 'manga')?.id;

View on GitHub (pinned to bed535e087)

Solutions

  1. Configure MANGADEX_CLIENT_ID/SECRET and username/password (or refresh token).
  2. Flush cache key mangadex:access-token to force token refresh.
  3. Confirm the account actually follows manga at mangadex.org.
  4. Loosen the language filter on the route.
Defensive patterns

Strategy: validation

Validate before calling

if (!config.mangadex.clientId || !config.mangadex.clientSecret) {
    throw new ConfigNotFoundError('User feed requires MANGADEX_* auth');
}

Type guard

const isMangaFeedResponse = (v: unknown): v is { data: unknown[] } =>
    typeof v === 'object' && v !== null && Array.isArray((v as any).data);

Prevention

When it happens

Trigger: GET https://api.mangadex.org/user/follows/manga-feed?... with an empty/invalid Bearer token, or the user genuinely follows nothing matching the language filter, returns no data.data array.

Common situations: MANGADEX_* auth not configured so accessToken is empty; access token expired and not refreshed; user follows no manga; language filter excludes all followed chapters; cached error persisting.

Related errors


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