Skip to content

Commit 5069018

Browse files
ref: Changed comments
1 parent 82438a1 commit 5069018

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/validation-errors-converter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ function convertValidationError(error) {
2222
return new SchemaValidatorError(`Property '${propName}' must have value '${params.allowedValue}'.`, errorObject.dataPath, errorObject.data)
2323
case 'enum':
2424
return convertEnum(errorObject.data, errorObject.dataPath, params, propName, errorObject.schemaPath)
25-
case 'keys_not_equal': {
25+
case 'keys_not_equal': {// non-schema error
2626
const message = `Provided keys do not match expected keys: ${params.originalKeys}.`
2727
return new SchemaValidatorError(message, errorObject.dataPath, errorObject.data)
2828
}
29-
case 'not_found':// this case use to be async
29+
case 'not_found':// non-schema error
3030
const notFoundPropName = params.notFoundPropName
3131
const message = `Cannot find ${notFoundPropName} with id ${errorObject.data}.`
3232
return new SchemaValidatorError(message, errorObject.dataPath, errorObject.data)

0 commit comments

Comments
 (0)