adapt-schemas 2.0.0 → 2.0.1
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/lib/Schema.js +2 -2
- package/package.json +1 -1
package/lib/Schema.js
CHANGED
|
@@ -302,10 +302,10 @@ class Schema extends EventEmitter {
|
|
|
302
302
|
const errors = compiled.errors && compiled.errors
|
|
303
303
|
.filter(e => e.keyword === 'required' ? !opts.ignoreRequired : true)
|
|
304
304
|
.map(e => e.instancePath ? `${e.instancePath} ${e.message}` : e.message)
|
|
305
|
-
.
|
|
305
|
+
.join(', ')
|
|
306
306
|
|
|
307
307
|
if (errors?.length) {
|
|
308
|
-
throw new SchemaError('VALIDATION_FAILED', `Validation failed for schema: ${this.name}`, {
|
|
308
|
+
throw new SchemaError('VALIDATION_FAILED', `Validation failed for schema: ${this.name} with errors: ${errors}`, {
|
|
309
309
|
schemaName: this.name,
|
|
310
310
|
errors,
|
|
311
311
|
data
|