Skip to content

gitflarePublicPartly agent-ready50

cf-workflows-pipeline

Durable content pipeline on Cloudflare Workflows: ingest, extract, summarise with Workers AI via AI Gateway, human approval, publish.

Fix pipeline runs failing at ingest (steps.attempt NOT NULL)629b2fa
JavaScript7 lines373 B
export async function api(path, opts = {}) {  const r = await fetch(path, { ...opts, headers: { "content-type": "application/json", accept: "application/json" }, body: opts.body ? JSON.stringify(opts.body) : undefined });  let d = null; try { d = await r.json(); } catch {}  if (!r.ok) throw new Error(d?.error?.message || `Request failed (${r.status})`);  return d;}