Fix JSON schema validation error message
RichardAkman opened this issue · comments
Current Behavior
The JSON schema type validation error throws a message that prints the schema itself in an unpleasant way as [object object].
Expected Behavior
The error message should be displayed in a more pleasant way. Either omit the schema object or at least fully display it.
The current solution is currently being discussed internally. Will update the issue once a decision for a fix has been reached.
To Reproduce
Attempt to upsert using a schema and config that doesn't pass the JSON schema validation. View the image below for reference.
Context
@rannn505 please give your product input on what the error message should be when a value does not match the ConfigSchema pattern provided by the schema. My opinion is that showing the full schema in a stringified version is a bit too much and can be unpleasant in cases where it's large, we can simply end the error message right before displaying the ConfigSchema.