@develit-services/bank 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -245,6 +245,9 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
245
245
|
async run(event, step) {
|
|
246
246
|
const { accountId } = event.payload;
|
|
247
247
|
const db = d1.drizzle(this.env.BANK_D1, { schema: drizzle.tables });
|
|
248
|
+
if (!accountId) {
|
|
249
|
+
throw new cloudflare_workflows.NonRetryableError(`Haven't obtained accountId to load.`);
|
|
250
|
+
}
|
|
248
251
|
while (true) {
|
|
249
252
|
const now = /* @__PURE__ */ new Date();
|
|
250
253
|
const account = await step.do("load account", async () => {
|
|
@@ -243,6 +243,9 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
|
|
|
243
243
|
async run(event, step) {
|
|
244
244
|
const { accountId } = event.payload;
|
|
245
245
|
const db = drizzle(this.env.BANK_D1, { schema: tables });
|
|
246
|
+
if (!accountId) {
|
|
247
|
+
throw new NonRetryableError(`Haven't obtained accountId to load.`);
|
|
248
|
+
}
|
|
246
249
|
while (true) {
|
|
247
250
|
const now = /* @__PURE__ */ new Date();
|
|
248
251
|
const account = await step.do("load account", async () => {
|