Skip to content

Commit faa175e

Browse files
committed
feat: included error check for expandData usage
1 parent 133db23 commit faa175e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/api/src/instrument-records/instrument-records.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ export class InstrumentRecordsService {
180180
subjectSex: record.subject.sex,
181181
timestamp: record.date.toISOString()
182182
};
183-
this.expandData(data, measureValue, instrument, objectRecord);
183+
const arrayResult = this.expandData(data, measureValue, instrument, objectRecord);
184+
if (arrayResult.isErr()) {
185+
throw new Error('Error interpreting array computed measure');
186+
}
184187
continue;
185188
}
186189
let list;

0 commit comments

Comments
 (0)