Skip to content

on validation error, add location in the description

Yannick requested to merge validation_err_location into master

in case of validation error, i.e. record not compliant with its schema, the error description didn't contain which field/property was incorrect making it quite tedious to figure out what to fix. Example of error description before:

{
"errors": "12 is not of type 'string'"
}

The change add the location path to the error description, so error description is now like:

{
"errors": "Value of data.TechnicalAssuranceTypeID is invalid: 12 is not of type 'string'"
}

Type of change

  • 🐛 Bug fix

Validation

  • New tests added
  • Covered by the unit tests
  • Covered by the integration tests
  • Non functional testing (performance, scalability, security ...)
  • Manual testing, description:

Merge request reports

Loading