cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
892 stars 80 forks source link

Fix JSON schema parsing error mesage on error in nested types #1270

Closed john-h-kastner-aws closed 1 month ago

john-h-kastner-aws commented 1 month ago

Description of changes

Fix #417. This avoid an extremely confusing error message (see issue for details).

The code removed here was originally intended to improve errors messages on errors in nested attribute by delaying reporting of these error until we know the attribute is required, but this didn't actually work and the errors are even worse than the would be without this code.

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

I confirm that this PR (choose one, and delete the other options):

I confirm that cedar-spec (choose one, and delete the other options):

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):