Hi, had the same issue, then redeployed and it was ok…
Hi, had the same issue, then redeployed and it was ok…
step.do returns a promise, you can use .catch() on it!neverthrow in your project like I am, you can do this! options.globalFailureHandler
Error: Not implemented yetenv.MY_WORKFLOW.create() call? If so, let's say after user registration, we want to setup billings, welcome emails, etc for the user (our most common use-case currently), with our usual load, we would that limit incredibly quickly, what is the solution for these scenarios?

wrangler logout && wrangler login a few times but its flaky and oddStep map csv to contacts-1 output is too large. Maximum allowed size is 1MiB.
wrangler dev it seems the second request is silently dropped, no error is raised but based on log output I can only observe one instance of the workflow being started.

Errored status.wrangler dev . This is a simplified version of my workflow/DO:
internal error; reference = 4t7lk8kksul8hag46prmnndt.catch()neverthrowoptions.globalFailureHandlerError: Aborting engine: Grace period completeError: Not implemented yetenv.MY_WORKFLOW.create()A request to the Cloudflare API (/accounts/<id>/workflows/<name>) failed.
Authentication error [code: 10000]wrangler logout && wrangler loginStep map csv to contacts-1 output is too large. Maximum allowed size is 1MiB.Erroredinternal error; reference = qkhe7o6ej7li8rrie5v0eks4internal error; reference = 4t7lk8kksul8hag46prmnndtconst validationResult = await step
.do('validate', async () => {
// do some logic here
return { somedata: true };
})
.catch((e) => {
// handle your error here, and possibly re-throw it if you want it to be fatal
});const validationResult = await fromPromise(
step.do('validate', async () => {
// do some logic that could throw here
return { somedata: true };
}),
(e) => e,
).match(
(result) => result,
(e) => {
// handle your error here, and possibly re-throw it if you want it to be fatal
},
);import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent, DurableObject } from 'cloudflare:workers';
import { ActionEvent } from '../types/events';
export class Portal extends DurableObject<Env> {
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
console.log('Initialising portal Durable Object');
}
async test(): string {
return "Hello!";
}
}
export class ActionWorkflow extends WorkflowEntrypoint<Env, ActionEvent> {
async run(params: WorkflowEvent<ActionEvent>, step: WorkflowStep) {
const event = params.payload;
const portalIdString = event.portal_id.toString();
console.log('Starting workflow', event);
const portal = this.env.PORTAL.getByName(portalIdString);
const test = await portal.test();
await step.do('test', async () => {
console.log(test);
});
}
}const portalResponse = await step.do('get-portal-response', async () => {
const portal = this.env.PORTAL.getByName(portalIdString);
return await portal.test();
});