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

with modifier target errors are confusing #343

Closed
tsandall opened this issue Jun 7, 2017 · 0 comments · Fixed by #1004
Closed

with modifier target errors are confusing #343

tsandall opened this issue Jun 7, 2017 · 0 comments · Fixed by #1004

Comments

@tsandall
Copy link
Member

tsandall commented Jun 7, 2017

If the with modifier is used on a non-input document reference, the compiler returns the following error message:

rego_type_error: test_rule: with keyword target must be input

This can be a bit confusing for users. It would be good to include the resolved target term in the error message.

When the with modifier is used to override the entire input document, it'll be much clearer if the input document has been mocked out inside the module.

@tsandall tsandall removed the ux label Nov 30, 2017
kichristensen added a commit to kichristensen/opa that referenced this issue Oct 12, 2018
Add the resolved target term in the error message
Fixes open-policy-agent#343

Signed-off-by: Kim Christensen <kimworking@gmail.com>
tsandall pushed a commit that referenced this issue Oct 12, 2018
Add the resolved target term in the error message
Fixes #343

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant