TypeError: Cannot read properties of undefined (reading 'job')
--
at Job.delta (file:///home/openaddresses/api/lib/types/job.js:166:52)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/openaddresses/api/routes/job.js:112:27
::ffff:127.0.0.1 - - [05/May/2023:15:16:31 +0000] "GET /api/job/40266/delta HTTP/1.0" 500 - "https://batch.openaddresses.io/job/40266" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
The job/:job/delta endpoint calls Job.delta(), which calls Data.list()here, and then datas[0].jobhere fails because datas[0] is undefined. datas comes from Data.list()here. When I execute a query that should match what is being run, I get a result with a job column.
From the logs:
The
job/:job/delta
endpoint calls Job.delta(), which callsData.list()
here, and thendatas[0].job
here fails becausedatas[0]
is undefined.datas
comes fromData.list()
here. When I execute a query that should match what is being run, I get a result with ajob
column.