DIYgod/RSSHub · error · Error
${type === 'playlist' ? 'Playlist' : 'User'} not found
Error message
${type === 'playlist' ? 'Playlist' : 'User'} not found What it means
Thrown (bare Error) by the Mixcloud route when the GraphQL lookup returns null/falsy data. callApi() returns response.data.data[<Type>Lookup]; a null result means Mixcloud's GraphQL found no user (or playlist) matching the supplied username/slug. The message distinguishes 'Playlist not found' from 'User not found' based on the type.
Source
Thrown at lib/routes/mixcloud/index.ts:116
}
return `${host}/${username}/${type === 'uploads' ? '' : type + '/'}`;
}
export async function handler(ctx) {
const username = ctx.req.param('username');
const playlistSlug = ctx.req.param('playlist');
const type = ctx.req.param('type') ?? (playlistSlug ? 'playlist' : 'uploads');
if (!Object.hasOwn(TYPE_CONFIG, type)) {
throw new InvalidParameterError(`Invalid type: ${type}`);
}
const { objectType, objectFields } = getObjectFields(type);
const data = await callApi(objectType, objectFields, username, playlistSlug);
if (!data) {
throw new Error(`${type === 'playlist' ? 'Playlist' : 'User'} not found`);
}
const isPlaylist = type === 'playlist';
const displayName = isPlaylist ? username : data.displayName;
const description = isPlaylist ? data.description : data.biog;
const picture = data.picture;
const image = picture && picture.urlRoot ? `${MIXCLOUD_CONFIG.imageBaseURL}${picture.urlRoot}` : '';
const itemsData = data[TYPE_CONFIG[type]];
const edges = itemsData?.edges || [];
const items = edges
.map((edge: any) => {
const cloudcast = getCloudcast(edge.node, type);
if (!cloudcast) {
return null;
}View on GitHub (pinned to bed535e087)
Solutions
- Open https://www.mixcloud.com/<username>/ in a browser — a 404 means the username is wrong.
- For playlists, confirm the slug from the playlist's real URL and that it belongs to the given username.
- Reproduce the GraphQL request to https://app.mixcloud.com/graphql with the same query to confirm the null lookup.
- If the user was renamed, find their current username and update the feed URL.
Defensive patterns
Strategy: type-guard
Validate before calling
if (!data) {
throw new Error(`${type === 'playlist' ? 'Playlist' : 'User'} '${username}' not found on Mixcloud.`);
} Type guard
function isMixcloudLookupResult(data: unknown): data is { displayName?: string; biog?: string; picture?: { urlRoot?: string } } {
return !!data && typeof data === 'object';
} Prevention
- Verify the username resolves in a browser before subscribing.
- For playlists, confirm the slug belongs to the user.
- Treat a null GraphQL lookup as a 404 NotFoundError rather than a bare Error for clearer client semantics.
When it happens
Trigger: The handler calls callApi(objectType, objectFields, username, playlistSlug); the GraphQL response's lookup field is null. Happens with a non-existent username, a typo, a deleted/renamed account, or a playlist slug that doesn't belong to that user.
Common situations: Username copied with wrong casing or extra characters; the user renamed their account; the playlist slug was guessed; Mixcloud's GraphQL shape changed so the lookup key no longer resolves.
Related errors
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/f42004391ad61ecd.
Report an issue: GitHub.