We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckError
Following Luke's suggestions, we should improve the error messages generated by jsonschema and exposed by the checks package.
jsonschema
checks
So, in checks, we should do the following modifications to all errors before returning them:
f"The '{field}' field needs to be a 'string'."
f"The '{field}' field needs to have a value in it, it is required."
Some options:
validation_errors_to_check_errors
ValidationError
validator
Make sure that CheckErrors raised in Sprout use these same error messages.
The text was updated successfully, but these errors were encountered:
What do we think of not including the field in the message? Because it is already in the json_path and errors are stringified like:
json_path
Error at `$.id` caused by `required`: The 'id' field needs to have a value in it, it is required.
Sorry, something went wrong.
No branches or pull requests
Following Luke's suggestions, we should improve the error messages generated by
jsonschema
and exposed by thechecks
package.So, in
checks
, we should do the following modifications to all errors before returning them:f"The '{field}' field needs to be a 'string'."
f"The '{field}' field needs to have a value in it, it is required."
Some options:
validation_errors_to_check_errors
, have a custom function generate the error message based on theValidationError
.CheckError
itself generate the error message based on thevalidator
and the name of the field when the error in constructed.Make sure that
CheckError
s raised in Sprout use these same error messages.The text was updated successfully, but these errors were encountered: