PharmaLedger-IMI / ctr-workspace

UC8 Clinical Trials Recruitment
MIT License
2 stars 0 forks source link

ctr-backoffice-backend: (node:33) UnhandledPromiseRejectionWarning: Error: cqtCollection is an empty Array in lform {"code":null,"name":"General Health Information" #17

Closed joaoluis-pdm closed 3 years ago

joaoluis-pdm commented 3 years ago

When enriching a Psoriatric Arthritis pre-screener with info

(node:33) UnhandledPromiseRejectionWarning: Error: cqtCollection is an empty Array in lform {"code":null,"name":"General Health Information"...yRepeatingItems":false}}
    at LFormsService.enrichWithCriteria (/ctr-workspace/ctr-backoffice-backend/dist/lforms/lforms.service.js:40:23)
    at MatchRequestService.enrichFormsWithCriteria (/ctr-workspace/ctr-backoffice-backend/dist/ctrial/matchrequest.service.js:38:32)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async MatchRequestController.findOne (/ctr-workspace/ctr-backoffice-backend/dist/ctrial/matchrequest.controller.js:52:13)
    at async /ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/core/router/router-execution-context.js:46:28
    at async /ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/core/router/router-proxy.js:9:17
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

The Psoriatric Arthritis has no "General Health Information" criteria defined.

joaoluis-pdm commented 3 years ago

Should have been fixed in 643d1045d733cd535ba7f91d3d3c703ddef504c6 which added the age>=18 condition.