Skip to content

Commit cfc05a8

Browse files
committed
chore: improve error message
1 parent 93c5b78 commit cfc05a8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ export class InstrumentRecordsService {
192192
if (Array.isArray(measureValue) && measureValue.length >= 1) {
193193
const arrayResult = this.expandData(measureValue);
194194
arrayResult.forEach((arrayEntry: ExpandDataType) => {
195-
if (!arrayEntry.success) throw new Error(arrayEntry.message);
195+
if (!arrayEntry.success)
196+
throw new Error(`exportRecords: ${instrument.internal.name}.${measureKey}${arrayEntry.message}`);
196197
data.push({
197198
groupId: record.subject.groupIds[0] ?? DEFAULT_GROUP_NAME,
198199
instrumentEdition: instrument.internal.edition,

0 commit comments

Comments
 (0)