Skip to content

Commit 26f91ef

Browse files
committed
feat: improve never throw expandData error msg
1 parent 8c06b93 commit 26f91ef

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ export class InstrumentRecordsService {
169169
instrument = (await this.instrumentsService.findById(record.instrumentId)) as ScalarInstrument;
170170
instruments.set(record.instrumentId, instrument);
171171
}
172-
console.log();
173172
for (const [measureKey, measureValue] of Object.entries(record.computedMeasures)) {
174173
if (Array.isArray(measureValue)) {
175174
const objectRecord: RecordObject = {
@@ -185,7 +184,6 @@ export class InstrumentRecordsService {
185184
this.expandData(data, measureValue, instrument, objectRecord);
186185
continue;
187186
}
188-
189187
let list;
190188
try {
191189
if (typeof measureValue === 'string') list = [JSON.parse(measureValue)];
@@ -471,7 +469,7 @@ export class InstrumentRecordsService {
471469
}
472470
return ok('Success');
473471
} else {
474-
return err('Not an Array');
472+
return err('Error interpretting array');
475473
}
476474
}
477475
private getInstrumentById(instrumentId: string) {

0 commit comments

Comments
 (0)