Skip to content
New issue

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

Fix JSON schema validation error message #320

Open
RichardAkman opened this issue Nov 29, 2023 · 1 comment
Open

Fix JSON schema validation error message #320

RichardAkman opened this issue Nov 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@RichardAkman
Copy link
Contributor

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

image (11)

@RichardAkman RichardAkman added the bug Something isn't working label Nov 29, 2023
@RichardAkman
Copy link
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant