The last step on one of our workflows is to batch send a newsletter to many users. We really don't w

The last step on one of our workflows is to batch send a newsletter to many users. We really don't want it to retry, ever. Locally, I had added a config of {retries:{limit:0}} to the step, but wrangler deploy didn't like that one when releasing to prod. So I wrapped the function with a try/catch throw new NonRetryableError() and hoped for the best. Unfortunately, we've already had our first double send. The batch send step failed with a Attempt failed due to internal workflows error, which seems to skip/miss the try/catch, so the (already successful, but now timed out) step retried ๐Ÿ™ I'm going to add a KV check to the start of the step, but am I missing something super obvious? Is there a recommended pathway for getting a step to only ever run once?
Was this page helpful?