{"record":{"id":"9473cb52adb61086","repo":"jackwener/OpenCLI","slug":"suno-accepted-the-request-but-returned-no-clip-ids","errorCode":null,"errorMessage":"Suno accepted the request but returned no clip ids.","messagePattern":"Suno accepted the request but returned no clip ids\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/suno/generate.js","lineNumber":177,"sourceCode":"            description,\n            makeInstrumental,\n            weirdness,\n            styleWeight,\n            userTier: session.planId,\n            createSessionToken,\n            transactionUuid,\n            deviceId,\n        });\n\n        if (!Array.isArray(submission.clips)) {\n            throw new CommandExecutionError('Suno generation returned malformed clips payload.');\n        }\n        const clipIds = submission.clips.map(c => c?.id);\n        if (clipIds.some(id => !id)) {\n            throw new CommandExecutionError('Suno generation returned malformed clip identity.');\n        }\n        if (!clipIds.length) {\n            throw new CommandExecutionError('Suno accepted the request but returned no clip ids.');\n        }\n\n        const clips = await pollSunoClips(page, clipIds, timeout, deviceId);\n        const completed = clips.filter(c => c.status === 'complete');\n        if (!completed.length) {\n            const errors = clips.map(c => `${c.id.slice(0, 8)}:${c.status}`).join(', ');\n            throw new CommandExecutionError(`All Suno clips failed (${errors}). Open ${SUNO_URL}/song/${clipIds[0]} to inspect.`);\n        }\n\n        const rows = [];\n        for (const clip of clips) {\n            const link = `${SUNO_URL}/song/${clip.id}`;\n            if (clip.status !== 'complete') {\n                rows.push({\n                    status: `❌ ${clip.status}`,\n                    clip: clip.id.slice(0, 8),\n                    title: clip.title || '(untitled)',\n                    files: '-',","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/suno/generate.js#L159-L195","documentation":"If Suno accepted the generation request but `submission.clips` is an empty array, there are no clip ids to poll. The CLI throws to distinguish 'request accepted but nothing produced' from malformed payloads.","triggerScenarios":"`submitSunoGeneration()` succeeds (HTTP-level) but `submission.clips.length === 0` — Suno created no clips for the request.","commonSituations":"Prompt rejected by content moderation with a silent empty response, all requested clips failed instantly server-side, or API drift where clips are now under a different key.","solutions":["Verify in a browser at https://suno.com/create whether the prompt produces songs (moderation may be silently blocking it).","Inspect the full submission response for alternative keys (e.g. clips nested in data/songs).","Rephrase the prompt/lyrics to avoid content-policy triggers and retry.","Check Suno status/announcements for ongoing incidents."],"exampleFix":"// before: assumes at least one clip\nconst first = submission.clips[0].id;\n// after: check emptiness explicitly\nif (!submission.clips?.length) throw new Error('Suno accepted the request but returned no clip ids — prompt may be moderated');","handlingStrategy":"validation","validationCode":"if (!Array.isArray(submission.clips) || submission.clips.length === 0) {\n  throw new Error('Suno returned no clips — prompt may be moderated or API shape changed');\n}","typeGuard":"function hasClips(v) { return Array.isArray(v?.clips) && v.clips.length > 0; }","tryCatchPattern":"try {\n  await opencli('suno', 'generate', prompt);\n} catch (e) {\n  if (/returned no clip ids/i.test(e.message)) {\n    return { empty: true, hint: 'check prompt against content policy or verify clips key in API response' };\n  }\n  throw e;\n}","preventionTips":["Sanity-check prompts/lyrics against Suno content policy before submitting.","Inspect full response body when clips come back empty to catch key renames.","Keep prompts non-empty and well-formed (CLI's ArgumentError already guards this upstream).","Test with a known-good prompt after any Suno site update."],"tags":["api-contract","empty-response","content-moderation"],"backgroundTag":"empty-response-payload","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}