@felloh-org/lambda-wrapper 1.0.21 → 1.0.22

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.
@@ -258,8 +258,14 @@ class Request extends _dependencyAware.default {
258
258
  } else {
259
259
  Logger.label('request-validation-failed');
260
260
  const validationErrorResponse = new _response.default({}, 422);
261
- validationErrorResponse.addError({
262
- request_parameters: validation
261
+ Object.keys(validation).forEach(validationKey => {
262
+ validation[validationKey].forEach(description => {
263
+ validationErrorResponse.addError({
264
+ type: 'validation',
265
+ field: validationKey,
266
+ description
267
+ });
268
+ });
263
269
  });
264
270
  reject(validationErrorResponse);
265
271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {