Hi folks - having some trouble with
Hi folks - having some trouble with throwing errors inside a workflow.
First, it seems throwing a NonRetryableError, is retried as many times as specified
Second, I can't seem to find out where the throw error messages are being returned in the workflow status. The docs seem to say
const wf = await MY_WORKFLOW.get(id)
and then await wf.status()
should return errors, but they are always empty.
here is the code I'm using to reproduce:
This logs "trying step 2" three times21 Replies
this is the data returned from workflow.status() promise. No errors in there

"wrangler": "^3.108.1" btw
cc @Luís Duarte 🧑🍳 @Diogo Ferreira
@wesbos - no
await step
- ?
I think your steps are just getting swallowedoh let me try - I was using the default example but re-made this to distill it down. 1 sec
same problem with the await.
Give me 30, need to interview this candidate
But looks fine...
no rush! Just poking around

Oh, I think we might have a beta bug for local dev here.
yeah was trying to repro this
Yeah - both these things do not work as expected in dev
by both I mean (1) NonRetryableError immediately haulting execution and (2) Showing error status
I'll fix this in a few moments 🙂
sweet thanks!
Thanks Luis!
Similar q: Are the step outputs available in prod as well? If so why is the output different when local?
step outputs are not available in prod atm 😅 - we just make it available in local to make debugging easier, while we find out a better way do it :soontm:
gotcha- thank you
github's CI isn't cooperating with me 🙂 - but that's the PR that fixes this: https://github.com/cloudflare/workers-sdk/pull/8123
i'll check in again when the prerelease version is up
GitHub
fix: nonretryable error and errored step caching by LuisDuarte1 · P...
Fixes WOR-468
Nonretrable error and errored step caching didn't match prod behavior
Tests
TODO (before merge)
Tests included
Tests not necessary because:
Wrangler E2E Tests CI Job ...
If you want to try it out, while it's not released:
npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13294041025/npm-package-wrangler-8123
thank you - will give it a shot tomorrow
I just joined the Discord to ask about this same issue! Glad it's being worked on 🙂
(the NonRetryableError issue, that is)