OpenFn / lwala

1 stars 3 forks source link

Bulk upsert HH: TypeError [Error]: Cannot read properties of undefined (reading 'split') #103

Closed aleksa-krolls closed 1 year ago

aleksa-krolls commented 1 year ago

Background

See issue #89 . This is related to the bulk workflow for Households

Issue

See run failure for Job 2 with error TypeError [Error]: Cannot read properties of undefined (reading 'split') https://www.openfn.org/projects/staging-lwala-chw-support/runs/06450fc8-de78-75bc-a424-a7d004258bc5

What is the unexpected input? Why is there a TypeError?

expression

Please work on the bulk-testing branch!! https://github.com/OpenFn/lwala/blob/bulk-testing/commcare-salesforce-jobs/upsert_household_and_household_visit.js

state

Run Job 1 (https://github.com/OpenFn/lwala/blob/bulk-testing/bulk/getCases-HH.js) to generate state for Job 2...

Job 1: configuration: SEE LP OpenFn CommCareHQ (Lwala) - PROD data: {}

Job 2: configuration: see LP Lwala Salesforce Sandbox (Bulk 2023) data: use the final state from job 1

output

If Job 1 gets 0 records from CommCare, then no action should happen in Job 2. If Job 1 gets >0 records from CommCare, then sync each item as a HH and Household Visit record to Salesforce.

aleksa-krolls commented 1 year ago

@mtuchi can you please assist? Seeing more issues as we're testing with different GET date range queries on the CommCare data