{"record":{"id":"dfed8a33844d8b38","repo":"DIYgod/RSSHub","slug":"failed-to-retrieve-user-follows-from-mangadex-api-dfed8a","errorCode":null,"errorMessage":"Failed to retrieve user follows from MangaDex API.","messagePattern":"Failed to retrieve user follows from MangaDex API\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/mangadex/user/feed.ts","lineNumber":97,"sourceCode":"            const response = await got.get(\n                `${userFollowUrl}${toQueryString({\n                    translatedLanguage: languagesQuery,\n                    order: {\n                        publishAt: 'desc',\n                    },\n                    limit,\n                })}`,\n                {\n                    headers: {\n                        Authorization: `Bearer ${accessToken}`,\n                        'User-Agent': config.trueUA,\n                    },\n                }\n            );\n\n            const followedChapterFeed = response?.data?.data;\n            if (!followedChapterFeed) {\n                throw new Error('Failed to retrieve user follows from MangaDex API.');\n            }\n\n            return followedChapterFeed;\n        },\n        config.cache.routeExpire,\n        false\n    )) as Array<Record<string, any>>;\n\n    const mangaIds = feed.map((chapter) => chapter?.relationships.find((relationship) => relationship.type === 'manga')?.id);\n\n    const mangaMetas = await getMangaMetaByIds(mangaIds);\n\n    return {\n        title: 'User Follows',\n        link: 'https://mangadex.org/titles/feed',\n        description: 'The latest updates of all the manga you follow on MangaDex.',\n        item: feed.map((chapter) => {\n            const mangaId = chapter.relationships.find((relationship) => relationship.type === 'manga')?.id;","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/mangadex/user/feed.ts#L79-L115","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Configure MANGADEX_CLIENT_ID/SECRET and username/password (or refresh token).","Flush cache key mangadex:access-token to force token refresh.","Confirm the account actually follows manga at mangadex.org.","Loosen the language filter on the route."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!config.mangadex.clientId || !config.mangadex.clientSecret) {\n    throw new ConfigNotFoundError('User feed requires MANGADEX_* auth');\n}","typeGuard":"const isMangaFeedResponse = (v: unknown): v is { data: unknown[] } =>\n    typeof v === 'object' && v !== null && Array.isArray((v as any).data);","tryCatchPattern":null,"preventionTips":["Require MANGADEX auth for any user-scoped route.","Flush mangadex:access-token if 401-shaped errors recur.","Return allowEmpty feeds when the user genuinely follows nothing."],"tags":["mangadex","api","authentication","validation"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}