{"record":{"id":"8cd0df5ec09ba733","repo":"ruvnet/ruflo","slug":"pinata-list-failed-http-res-status-json-st","errorCode":null,"errorMessage":"Pinata list failed (HTTP ${res.status}): ${JSON.stringify(res.data)}","messagePattern":"Pinata list failed \\(HTTP (.+?)\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/appliance/rvfa-distribution.ts","lineNumber":377,"sourceCode":"  }\n\n  async publishPatch(patchBuf: Buffer, meta?: PublishMetadata): Promise<PublishResult> {\n    const name = meta?.name || `patch-${Date.now()}.rvfp`;\n    return this.upload(name, patchBuf, {\n      type: 'rvfp-patch', version: meta?.version || '', description: meta?.description || '',\n    });\n  }\n\n  async fetch(cid: string, outputPath: string): Promise<void> {\n    const data = await httpGet(`${this.gw}/ipfs/${cid}`);\n    await mkdir(dirname(outputPath), { recursive: true });\n    await writeFile(outputPath, data);\n  }\n\n  async list(): Promise<PublishedItem[]> {\n    const res = await pinataReq('GET', `${this.api}/data/pinList?status=pinned&pageLimit=100`, this.jwt);\n    if (res.status !== 200)\n      throw new Error(`Pinata list failed (HTTP ${res.status}): ${JSON.stringify(res.data)}`);\n    const d = res.data as { rows: Array<{\n      ipfs_pin_hash: string; metadata?: { name?: string }; size: number; date_pinned: string;\n    }> };\n    return (d.rows || []).map((r) => ({\n      cid: r.ipfs_pin_hash, name: r.metadata?.name || r.ipfs_pin_hash,\n      size: r.size, date: r.date_pinned,\n    }));\n  }\n\n  async pin(cid: string, name?: string): Promise<void> {\n    const body = Buffer.from(JSON.stringify({ hashToPin: cid, pinataMetadata: { name: name || cid } }));\n    const res = await pinataReq('POST', `${this.api}/pinning/pinByHash`, this.jwt, body, 'application/json');\n    if (res.status !== 200)\n      throw new Error(`Pinata pin failed (HTTP ${res.status}): ${JSON.stringify(res.data)}`);\n  }\n}\n\n// ── Convenience exports ──────────────────────────────────────","sourceCodeStart":359,"sourceCodeEnd":395,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/appliance/rvfa-distribution.ts#L359-L395","documentation":"GET /data/pinList?status=pinned returned non-200; the message embeds the status code and response body. In practice dominated by 401 (expired or invalid JWT), with 429 rate-limiting and 5xx incidents as the transient cases. Only this list endpoint is involved — pinning/fetching can still work if the cause is request-rate.","triggerScenarios":"`publisher.list()` with a revoked or expired JWT; frequent polling of list() tripping rate limits; a custom apiUrl that is wrong or targets a deprecated Pinata API host.","commonSituations":"Same JWT lifecycle problems as upload failures; dashboards or scripts that poll pinList every few seconds; API base URL overrides that drift from https://api.pinata.cloud.","solutions":["401 → regenerate the JWT and update PINATA_API_JWT","429 → slow the polling cadence and cache the result between calls","Verify any apiUrl override is the correct Pinata base URL","Check status.pinata.cloud for ongoing incidents when 5xx"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"let cached: PublishedItem[] | null = null;\nlet lastList = 0;\nasync function listThrottled(p: RvfaPublisher): Promise<PublishedItem[]> {\n  if (cached && Date.now() - lastList < 60_000) return cached; // avoid rate limits\n  cached = await p.list();\n  lastList = Date.now();\n  return cached;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await publisher.list();\n} catch (e) {\n  const msg = String(e);\n  if (/HTTP 401/.test(msg)) throw new Error('Pinata JWT expired — rotate PINATA_API_JWT');\n  if (/HTTP (429|5\\d\\d)/.test(msg)) { /* backoff and retry once */ }\n  else throw e;\n}","preventionTips":["Cache pinList results and poll at a slow cadence instead of per-request","Rotate JWTs on a schedule and alert before expiry","Verify any apiUrl override points at the live Pinata API base"],"tags":["rvfa-distribution","pinata","ipfs","http"],"backgroundTag":"http-api-error","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}