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

1-arity built-in error messages refer to incorrect term #205

Closed
tsandall opened this issue Dec 21, 2016 · 0 comments
Closed

1-arity built-in error messages refer to incorrect term #205

tsandall opened this issue Dec 21, 2016 · 0 comments
Labels

Comments

@tsandall
Copy link
Member

tsandall commented Dec 21, 2016

The errors returned by the 1-arity arithmetic functions refer to the wrong term ("abs" below):

> abs("hello", 1)
error: 1:1: expected number (operand abs is not a number): illegal argument: "hello"
@tsandall tsandall added the bug label Dec 21, 2016
@tsandall tsandall changed the title abs built-in error messages refer to incorrect term 1-arity built-in error messages refer to incorrect term Dec 22, 2016
tsandall added a commit to tsandall/opa that referenced this issue Jan 20, 2017
These changes address issues with the existing built-ins:

1. Error messages are improved to avoid leaking sensitive values.
2. Helpers are provided to report common errors consistently.
3. Built-in developmnet is simplified by removing boilerplate. Built-ins
no longer have to invoke the query iterator, unify/unbind results, etc.

Also, remove the adding-builtins.md doc in favour of an example test
case.

Fixes open-policy-agent#205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant