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

Show detailed validation errors #172

Merged
merged 2 commits into from
Sep 20, 2023
Merged

Conversation

keichan34
Copy link
Contributor

Thank you for submitting a pull request!

Description

This PR is on top of my previous one #171

Include layer ID with error output

Previously, the validation error would only show the path of the error.
For example:

Error: layers[47].filter[3][1][2]: Expected object but found string instead.

This patch will look up the layer ID to make it easier to find the offending layer

Error: Layer "highway-minor": layers[47].filter[3][1][2]: Expected object but found string instead.

Type of Pull Request

  • Adding a feature
  • Fixing a bug
  • Maintaining documents
  • Others ()

Verify the followings

  • Code is up-to-date with the main branch
  • No build errors after npm run build
  • No lint errors after npm run lint
  • No errors on using charites help globally
  • Make sure all the existing features working well
  • Have you added at least one unit test if you are going to add new feature?
  • Have you updated documentation?

Refer to CONTRIBUTING.MD for more details.

Previously, the validation error would only show the path of the error.
For example:

layers[47].filter[3][1][2]: Expected object but found string instead.

This patch will look up the layer ID to make it easier to find the offending layer
Copy link
Contributor

@smellman smellman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@keichan34 keichan34 merged commit 2cd6f02 into main Sep 20, 2023
@keichan34 keichan34 deleted the show-detailed-validation-errors branch September 20, 2023 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants