Skip to content

Cloudflare Workflow retries on NonRetryableError in dev mode #10113

@bastiankistner

Description

@bastiankistner

What versions & operating system are you using?

System:
OS: macOS 15.5
CPU: (10) arm64 Apple M1 Max
Memory: 193.95 MB / 64.00 GB
Shell: 5.9 - /bin/zsh

Binaries:
Node: 24.4.1 - ~/.local/state/fnm_multishells/28670_1753786480646/bin/node
npm: 11.4.2 - ~/.local/state/fnm_multishells/28670_1753786480646/bin/npm
pnpm: 10.13.1 - ~/Library/pnpm/pnpm
bun: 1.2.19 - ~/.bun/bin/bun

npmPackages:
@cloudflare/workers-types: ^4.20250417.0 => 4.20250423.0
wrangler: ^4.26.1 => 4.26.1

Please provide a link to a minimal reproduction

https://github.com/bastiankistner/cloudflare-workflows-retry-error

Describe the Bug

I'm currently experimenting with Workflows and it seems that when I throw a new NonRetryableError("") with an empty message, the workflow retries the failed step. I just tried it in production and there it seems that the workflow correctly exits, even when the message is empty. However, when I set a non-empty message, the workflow also fails, as expected, for wrangler dev

I provided a reproduction repo based on the starter docs with
npm create cloudflare@latest workflows-starter -- --template "cloudflare/workflows-starter"

I only changed the MyWorkflow class to help you see what's happening.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions