@appxdigital/appx-core 0.1.80 → 0.1.82

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.
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../src/common/utils/error-handler.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,CAmC7C"}
1
+ {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../src/common/utils/error-handler.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,CAoC7C"}
@@ -30,7 +30,8 @@ function handleError(error) {
30
30
  case 'P2003':
31
31
  throw new common_1.ForbiddenException('Foreign key constraint failed:', error.message);
32
32
  default:
33
- throw new common_1.BadRequestException('A Prisma database error occurred.');
33
+ console.error(error);
34
+ throw new common_1.InternalServerErrorException('A Prisma database error occurred.', error.message);
34
35
  }
35
36
  }
36
37
  console.error('Error:', error);
@@ -78,7 +78,7 @@ let PrismaService = class PrismaService {
78
78
  const contextModel = nestjs_request_context_1.RequestContext.currentContext?.req.prisma?.[propKey] || model;
79
79
  return async (params, options) => {
80
80
  // delete, deleteMany, update and updateMany methods should not apply field omission because they are not selecting fields
81
- if (!options?.BYPASS_OMISSION && !['delete', 'deleteMany', 'update', 'updateMany', 'create'].includes(methodKey.toString()))
81
+ if (!options?.BYPASS_OMISSION && !['delete', 'deleteMany', 'update', 'updateMany', 'create', 'createMany'].includes(methodKey.toString()))
82
82
  params = this.applyFieldOmission(String(propKey), userRole, params);
83
83
  if (!options?.BYPASS_FILTERING) {
84
84
  params = this.applyWhereConditions(String(propKey), userRole, params, user, methodKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appxdigital/appx-core",
3
- "version": "0.1.80",
3
+ "version": "0.1.82",
4
4
  "description": "Appx Core is a library that provides a set of tools to help you build your application faster.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",