{"record":{"id":"6837ac75ac6464d6","repo":"jackwener/OpenCLI","slug":"http-probe-httpstatus-from-clerk-suno-com","errorCode":null,"errorMessage":"HTTP ${probe.httpStatus} from clerk.suno.com","messagePattern":"HTTP (.+?) from clerk\\.suno\\.com","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/suno/auth.js","lineNumber":44,"sourceCode":"      }\n      if (!r.ok) return { kind: 'http', httpStatus: r.status };\n      const d = await r.json();\n      const sessions = d?.response?.sessions || [];\n      if (!Array.isArray(sessions) || sessions.length === 0) {\n        return { kind: 'auth', detail: 'clerk.suno.com sessions=[] — anonymous' };\n      }\n      const active = sessions.find(s => s.status === 'active') || sessions[0];\n      const user = active?.user;\n      if (!user?.id) {\n        return { kind: 'auth', detail: 'clerk.suno.com session present but no user.id — stale session' };\n      }\n      return { ok: true, user_id: String(user.id), name: String(user.username || '') };\n    } catch (e) {\n      return { kind: 'exception', detail: String(e && e.message || e) };\n    }\n  })()`);\n  if (probe?.kind === 'auth') throw new AuthRequiredError('suno.com', probe.detail);\n  if (probe?.kind === 'http') throw new CommandExecutionError(`HTTP ${probe.httpStatus} from clerk.suno.com`);\n  if (probe?.kind === 'exception') throw new CommandExecutionError(`Suno whoami failed: ${probe.detail}`);\n  if (!probe?.ok) throw new CommandExecutionError(`Unexpected Suno probe: ${JSON.stringify(probe)}`);\n  return { user_id: probe.user_id, name: probe.name };\n}\n\nregisterSiteAuthCommands({\n  site: 'suno',\n  domain: 'suno.com',\n  loginUrl: 'https://suno.com/?sign-in=true',\n  columns: ['user_id', 'name'],\n  quickCheck: hasSunoClerkCookie,\n  verify: verifySunoIdentity,\n  poll: async (page) => {\n    if (!await hasSunoClerkCookie(page)) {\n      throw new AuthRequiredError('suno.com', 'Waiting for Suno Clerk __session/__client cookie');\n    }\n    return verifySunoIdentity(page);\n  },","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/suno/auth.js#L26-L62","documentation":"The Clerk client endpoint clerk.suno.com/v1/client answered with a non-OK, non-auth status (anything other than 2xx/401/403), so verifySunoIdentity wraps it as a CommandExecutionError with the HTTP status. This is a server/gateway-level problem, not a credential problem.","triggerScenarios":"fetch to https://clerk.suno.com/v1/client?_clerk_js_version=5 returns e.g. 429, 5xx, or a proxy error status while running verifySunoIdentity.","commonSituations":"Clerk outage or rate limiting (429) after many automated calls; corporate proxy / captive portal intercepting requests; CDN returning 502/503; offline machine served an error page.","solutions":["Wait and retry — 429/5xx are usually transient","Check network path: disable proxy/VPN that may intercept clerk.suno.com","Check Clerk/Suno status pages for an outage","If rate-limited, back off and reduce polling frequency"],"exampleFix":"// before\nawait cli('suno', 'whoami'); // -> CommandExecutionError: HTTP 503 from clerk.suno.com\n// after (caller-side retry)\nfor (let i = 0; i < 3; i++) {\n  try { return await cli('suno', 'whoami'); }\n  catch (e) { if (!/HTTP \\d+ from clerk.suno.com/.test(e.message)) throw e; await sleep(2 ** i * 1000); }\n}","handlingStrategy":"retry","validationCode":"// Quick reachability check\nconst res = await fetch('https://clerk.suno.com/v1/client?_clerk_js_version=5');\nif (res.status === 429 || res.status >= 500) await new Promise(r => setTimeout(r, 5000));","typeGuard":"function isTransientHttpStatus(status) { return status === 429 || status >= 500; }","tryCatchPattern":"try {\n  await cli('suno', 'whoami');\n} catch (e) {\n  const m = e.message.match(/HTTP (\\d+) from clerk\\.suno\\.com/);\n  if (m && isTransientHttpStatus(+m[1])) { await backoff(); return cli('suno', 'whoami'); }\n  throw e;\n}","preventionTips":["Add exponential backoff for 429/5xx responses","Avoid tight polling loops against clerk.suno.com to prevent rate limiting","Check proxy/VPN settings that could intercept clerk.suno.com traffic","Monitor Clerk/Suno status during incidents before debugging your own code"],"tags":["network","http","clerk","rate-limit"],"backgroundTag":"http-5xx-upstream","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}