vovk-ajv 0.0.0-draft.69 → 0.0.0-draft.71

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.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -29,7 +29,7 @@ const validate = ({ data, schema, ajv, localize = 'en', type, endpoint, }) => {
29
29
  const isValid = ajv.validate(schema, data);
30
30
  if (!isValid) {
31
31
  ajv_i18n_1.default[localize](ajv.errors);
32
- throw new vovk_1.HttpException(vovk_1.HttpStatus.NULL, `Ajv validation failed. Invalid ${isForm ? 'form' : type} on client: ${ajv.errorsText()}`, { data, errors: ajv.errors, endpoint });
32
+ throw new vovk_1.HttpException(vovk_1.HttpStatus.NULL, `Ajv validation failed. Invalid ${isForm ? 'form' : type} on client: ${ajv.errorsText()}`, JSON.stringify({ data, errors: ajv.errors, endpoint }));
33
33
  }
34
34
  }
35
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-ajv",
3
- "version": "0.0.0-draft.69",
3
+ "version": "0.0.0-draft.71",
4
4
  "description": "Local validation for JSON schemas for vovk-zod and other validation libraries for Vovk.ts",
5
5
  "main": "index.js",
6
6
  "scripts": {