I'm getting an error fetching a file from R2 within my workflow ```[ERROR] Uncaught (in promise) DOM
I'm getting an error fetching a file from R2 within my workflow
[ERROR] Uncaught (in promise) DOMException const file = await step.do("get file from R2", async () => {
return this.env.STATEMENT_BUCKET.get(fileIdentifier)
});next_cursor so that you know the next page to go and fetch. My question:
import { env } from 'cloudflare:workers' populated in workflows? just wondering, can't really test this spot in my code



workers-sdk repoAttempt failed due to internal workflows error just realized I had some of the errored throwing that err✘ [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:try { 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;
}
}next_cursorimport { env } from 'cloudflare:workers'let next_cursor;
do {
next_cursor = await step( ...call API and do stuff ...);
} while (next_cursor !== null)