rez_core 2.2.129 → 2.2.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/master/controller/master.controller.d.ts +0 -4
- package/dist/module/master/service/master.service.d.ts +0 -4
- package/dist/module/master/service/master.service.js +4 -1
- package/dist/module/master/service/master.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/master/service/master.service.ts +5 -2
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
1
|
+
import { BadRequestException, Injectable } from '@nestjs/common';
|
|
2
2
|
import { Brackets, EntityManager } from 'typeorm';
|
|
3
3
|
import { ExcelUtil } from 'src/utils/service/excelUtil.service';
|
|
4
4
|
import { EntityMasterService } from '../../meta/service/entity-master.service';
|
|
@@ -371,7 +371,10 @@ export class MasterService {
|
|
|
371
371
|
|
|
372
372
|
// ✅ if any row failed, return errors instead of inserting
|
|
373
373
|
if (errors.length > 0) {
|
|
374
|
-
|
|
374
|
+
throw new BadRequestException({
|
|
375
|
+
message: 'Validation errors found',
|
|
376
|
+
errors,
|
|
377
|
+
});
|
|
375
378
|
}
|
|
376
379
|
|
|
377
380
|
// ✅ only upsert if no validation errors
|