meteorjs-decorators 1.0.1 → 1.0.2

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.
@@ -33,9 +33,9 @@ function Validate(...dtos) {
33
33
  const errors = (0, class_validator_1.validateSync)(requestDto);
34
34
  if (errors.length > 0) {
35
35
  const details = errors
36
- .flatMap((error) => Object.values(error.constraints ?? {}).map((message) => `${error.property}: ${message}`))
36
+ .map((error) => error.toString(false, false, '', true) + '\n')
37
37
  .join('; ');
38
- throw new Meteor.Error('validation-error', 'Validation failed', details || 'Validation failed');
38
+ throw new Meteor.Error('validation-error', 'Validation failed', details);
39
39
  }
40
40
  // Replace object argument with validated DTO
41
41
  args[i] = requestDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meteorjs-decorators",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Meteor decorators to make your Meteor app with NestJS-style pattern.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",