is it possible to see logs created by "console.log" in the steps somewhere?
is it possible to see logs created by "console.log" in the steps somewhere?




workers-sdk repoAttempt failed due to internal workflows error just realized I had some of the errored throwing that errstep methods are just async function calls at the end of the day.step.waitForEvent (and instance.sendEvent) APIs! https://blog.cloudflare.com/workflows-ga-production-ready-durable-execution/
createBatch to reduce the number of calls, if that applies to your usecase
✘ [ERROR] workerd/jsg/setup.c++:39: fatal: V8 fatal error; location = :0; message = Check failed: needs_context && current_scope_ == closure_scope_ && current_scope_->is_function_scope() && !function_.is_null() implies function_->context() != *context_.
*** Received signal #6: Abort trap: 6
stack:workers-sdkAttempt failed due to internal workflows errortry { await step.do("first step") } catch { ... }
try { await step.do("second step") } catch { ... }
try { await step.do("third step") } catch { ... }class EndWorkflowError extends NonRetryableError {
event: WorkflowEvent<Params>;
shouldFallback: boolean;
constructor(data: {
message: string;
error: unknown;
event: WorkflowEvent<Params>;
shouldFallback?: boolean;
}) {
super(data.message);
this.name = 'EndWorkflowError';
this.message = data.message;
this.event = data.event;
this.cause = data.error;
this.shouldFallback = data.shouldFallback === undefined ? true : data.shouldFallback;
}
}const shouldHappen = await step.do('check condition', async () => { return false })
if (shouldHappen) {
await step.do('conditional step', async () => { //do something })
}const shouldHappen = await step.do('check condition', async () => { return false })
await step.do('conditional step', async () => {
if (!shouldHappen) return
//do something
})stepstep.waitForEventstep.waitForEventinstance.sendEventcreateBatchconst workflow = await this.env.CONNECTIONS_WORKFLOW.get(workflowId);
await workflow.sendEvent({ type: 'form-submission', payload });TypeError: (intermediate value).sendEvent is not a function