Workflows makes it easier to build reliable multi-step applications that can recover when downstream systems fail. Rollback handlers now receive the original step context via a ctx object for the step being rolled back. This includes ctx.step.name, ctx.step.count, ctx.attempt, and the step config with defaults applied.
The step configuration includes the retry and timeout settings used for that step, so you can customize your step recovery logic according to those fields.
await step.do( "create charge", async () => { const charge = await createCharge(); return { chargeId: charge.id }; }, { rollback: async ({ ctx, output, error }) => { // `output` is the value returned by the step being rolled back. const { chargeId } = output as { chargeId: string }; await refundCharge(chargeId, { // `ctx` is the original step context, including step name, count, attempt, and config. reason: `${ctx.step.name}: ${error.message}`, }); }, rollbackConfig: { // `rollbackConfig` controls retries and timeout for the rollback handler. retries: { limit: 3, delay: "30 seconds", backoff: "linear" }, timeout: "5 minutes", }, },);Refer to rollback options to learn more.
Source: Cloudflare
Latest Posts
- Cloudflare Tunnel, Cloudflare Tunnel for SASE, Cloudflare Mesh, Gateway, Cloudflare One – Hostname routing is now generally available, with a new public IP range for initial resolved IPs

- langcache-embed-v3-small, Mellum2-12B-A2.5B-Thinking, and LightOnOCR-2-1B models now available on Amazon SageMaker JumpStart

- Amazon EC2 High Memory U7i instances now available in AWS South America (São Paulo) region

- GLM-5.2 FP8, NVIDIA-Nemotron-Nano-12B-v2 and GLM-OCR models now available on Amazon SageMaker JumpStart







