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

Improve error message for template slot mismatch #411

Conversation

svanderbleek
Copy link
Contributor

Description of changes

Improve error message when there is a template slot mismatch such as principal = ?resource instead of principal = ?principal.

Issue #391

Checklist for requesting a review

The change in this PR is:

  • A change "invisible" to users (e.g., documentation, changes to "internal" crates like cedar-policy-core, cedar-validator, etc.)

I confirm that this PR:

  • Does not update the CHANGELOG because my change does not significantly impact released code.

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

  • Does not require updates because my change does not impact the Cedar Dafny model or DRT infrastructure.

Disclaimer

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aaronjeline aaronjeline self-requested a review November 8, 2023 19:01
Copy link
Contributor

@cdisselkoen cdisselkoen left a comment

Choose a reason for hiding this comment

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

Looks great but can we add a unit test for the failing case, that checks that the error message is appopriate?

@svanderbleek svanderbleek force-pushed the bug/svanderbleek/template-slot-parse-error branch from 0f0758d to 3b65bd5 Compare November 9, 2023 19:47
@cdisselkoen cdisselkoen merged commit 0487415 into cedar-policy:main Nov 9, 2023
6 of 7 checks passed
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.

3 participants