-
Notifications
You must be signed in to change notification settings - Fork 91
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 explicitly empty appliesTo #1335
Comments
It seems a deeper issue is that parse errors thrown by lalrpop do not get access to the source string and hence cannot properly implement the |
We did adjust the lalrpop for the policy format to provide the source string (#516). Perhaps we need the same change in the schema-format lalrpop file. |
There's certain part missing in the Cedar schema parser. I'm looking into it and see if we can reuse code for both parsers. |
It seems this is a CLI issue. The
Is it good enough or we want more? |
To be more specific, Kesha used to point out in #977 that |
Right. We could fix this in either or both places, though attaching it to the error directly could possibly be useful to callers other than the CLI. |
Probably too late to bring it up: I was wondering if we should, instead of having more involved #516, let users of error structs handle/process source code. More specifically, they can use |
IMO it is better for us to attache the source code directly. It's possible that different errors could contain references into different source strings, E.g., different policies parsed from different files used together in an auth request, which would make it almost impossible for the user to figure out the correct source for each error. |
For this case, I think that it's better that users write wrappers around Cedar parser APIs that return a |
Category
Error message improvements
Describe the feature you'd like to request
For the following schema:
The error message when parsing this is currently (as of 4.2.2)
This could be more clear. It also doesn't have any locating information, like a source location, or an indication of which
action
had the parsing problem.Describe alternatives you've considered
N/A
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: