DIYgod/RSSHub · warning · InvalidParameterError
${userData.data.user.result.message}||User is unavailable
Error message
${userData.data.user.result.message}||User is unavailable What it means
Dynamic InvalidParameterError thrown when userData.data.user.result.__typename === 'UserUnavailable'. Twitter sets UserUnavailable (with a message such as 'User suspended', 'User protects their tweets', or 'User has been suspended') when an account exists but is not servable; RSSHub forwards Twitter's message or falls back to 'User is unavailable'.
Source
Thrown at lib/routes/twitter/api/web-api/api.ts:172
undefined,
{
...params,
listId: id,
count: 20,
},
['list', 'tweets_timeline', 'timeline']
),
['listConversation-']
);
const getUser = async (id: string) => {
const userData: any = await getUserData(id);
if (!userData.data.user) {
throw new InvalidParameterError("This account doesn't exist");
}
if (userData.data.user.result.__typename === 'UserUnavailable') {
throw new InvalidParameterError(userData.data.user.result.message || 'User is unavailable');
}
return {
profile_image_url: userData.data?.user?.result?.avatar?.image_url,
description: userData.data?.user?.result?.profile_bio?.description,
...userData.data?.user?.result?.core,
};
};
const getHomeTimeline = async (id: string, params?: Record<string, any>) =>
gatherLegacyFromData(
await paginationTweets(
'HomeTimeline',
undefined,
{
...params,
count: 20,
includePromotedContent: true,View on GitHub (pinned to bed535e087)
Solutions
- Read the forwarded message to identify the cause (suspended / protected / unavailable).
- If protected, the token owner must be an approved follower; use a token belonging to an approved follower.
- Switch to a different auth token whose region/account state can view the user.
- Remove the feed; the condition is server-side and outside RSSHub's control.
Defensive patterns
Strategy: try-catch
Type guard
function isUserUnavailable(userData: any): boolean {
return userData?.data?.user?.result?.__typename === 'UserUnavailable';
} Try / catch
try { await fetchRss('/twitter/user/<handle>'); }
catch (e) {
const msg = String(e);
if (/suspended/i.test(msg)) { /* permanent, drop feed */ }
else if (/protect/i.test(msg)) { /* use an approved-follower token */ }
else if (/unavailable/i.test(msg)) { /* retry later */ }
else throw e;
} Prevention
- Treat UserUnavailable as potentially transient — retry with backoff unless the message says 'suspended'.
- For protected accounts, use a token owned by an approved follower.
- Forward the dynamic message to your monitoring so the specific cause is visible.
When it happens
Trigger: The target account is suspended by Twitter, protected/locked, age-restricted, or geo-blocked for the token's region. getUser() inspects __typename and re-throws Twitter's own reason text, so the exact message varies per request.
Common situations: Subscribing to a feed of an account that later gets suspended; following a protected account whose owner locked it; token region is restricted from viewing the account; Twitter policy enforcement against the account.
Related errors
- User not found
- Tweet ID is required
- User ID is required for the v2 home timeline
- User not found
- User not found
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/eba7a7a568520b4f.
Report an issue: GitHub.